GeneralPSTRICKS: Diagram of area bounded by curves, best practise?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

PSTRICKS: Diagram of area bounded by curves, best practise?

Post by yoyoimut »

When make a diagram of area bounded by curves, I have 4 choices:
Method1.jpg
Method1.jpg (145.28 KiB) Viewed 2464 times
Method2.jpg
Method2.jpg (155.93 KiB) Viewed 2464 times
Method3.jpg
Method3.jpg (153.87 KiB) Viewed 2464 times
Due to forum restriction, one more will be submitted in a separate post.
Last edited by yoyoimut on Wed Oct 06, 2010 3:29 pm, edited 1 time in total.

Recommended reading 2024:

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

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

yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

PSTRICKS: Diagram of area bounded by curves, best practise?

Post by yoyoimut »

Method4.jpg
Method4.jpg (161.33 KiB) Viewed 2463 times
Source Code:
fillarea.tex
(2.17 KiB) Downloaded 323 times

Which method is recommended as the best practise?

Any pros and cons are also welcome.

Thank you in advance.

yoyo
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTRICKS: Diagram of area bounded by curves, best practise?

Post by CrazyHorse »

yoyoimut wrote:When make a diagram of area bounded by curves, I have 4 choices:
this way:

Code: Select all

\documentclass[12pt,a4paper]{book}
\usepackage{pst-plot}

\begin{document}

\begin{pspicture}[showgrid,algebraic](5,4)
\pscustom[linestyle=none,fillcolor=yellow,fillstyle=solid]{%
  \psplot{4}{1}{sin(2*x)+1.5}
  \psplot{1}{4}{-0.5*x+2.5}
}
\psset{linewidth=2pt}
\psplot{4}{1}{sin(2*x)+1.5}
\psplot{1}{4}{-0.5*x+2.5}
\end{pspicture}

\end{document}
Herbert
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

Re: PSTRICKS: Diagram of area bounded by curves, best practi

Post by yoyoimut »

Thanks Herbert!

Your solution is very compact.
I no longer need to write RPN notations with algebraic option.
Excellent!
Post Reply