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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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