Graphics, Figures & Tables'Clipped' sine curve in PGFPlots

Information and discussion about graphics, figures & tables in LaTeX documents.
europaflyer
Posts: 6
Joined: Mon Dec 10, 2012 4:50 pm

Re: 'Clipped' sine curve in PGFPlots

Post by europaflyer »

Very many thanks to you both! I'm something of a LaTeX newbie, and it's really great to get the help from people who really know their business. This does the job perfectly.

Just one final question - is it possible to add a second curve not restricted by the clipping?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

feuersaenger
Posts: 34
Joined: Sun Oct 16, 2011 5:56 pm

Re: 'Clipped' sine curve in PGFPlots

Post by feuersaenger »

Hi europaflyer,

Yes, you can add a second curve which is unaffected by the clipping.

It actually works with both types of clipping:

if you choose to use the \clip approach: the \clip statement applies to all plots AFTERWARDS.

if you choose to use the 'restrict y to domain' approach: just move this option into the option list of the affected \addplots.

Kind regards

Christian

@Stefan
Actually: yes, of course!
europaflyer
Posts: 6
Joined: Mon Dec 10, 2012 4:50 pm

Re: 'Clipped' sine curve in PGFPlots

Post by europaflyer »

I see. I hadn't made the connection that the individual \addplots options worked the same as the general options. A steep learning curve!

Again, many thanks.
Post Reply