Document ClassesPSTricks | Plot of a Gauss Curve

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
vdhvu
Posts: 3
Joined: Mon Mar 12, 2007 9:35 am

PSTricks | Plot of a Gauss Curve

Post by vdhvu »

Could you help me using PSTricks to draw a bell-shaped curve with filling two tails as in the attached picture?

Thank you.
Attachments
Gauss.jpg
Gauss.jpg (40.69 KiB) Viewed 11599 times

Recommended reading 2024:

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

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks | Plot of a Gauss Curve

Post by localghost »

This is not so complicated as it seems to be. All you need is the pstricks-add package and the pst-func package.

Code: Select all

Code, edit and compile here:
\documentclass{minimal}
\usepackage{pst-func,pstricks-add}
\begin{document}
\begin{pspicture}[showgrid=false](-5,-1)(5,5)
\psset{yunit=4cm,xunit=2}
\pscustom[linestyle=none,fillcolor=red,fillstyle=solid]{%
\psline(-1,0.125)(-1,0)(-1.75,0)
\psGauss{-1.75}{-1}
}
\pscustom[linestyle=none,fillcolor=red,fillstyle=solid]{%
\psGauss{1}{1.75}
\psline(1.75,0)(1,0)(1,0.125)
}
\psaxes[Dy=0.25,linecolor=blue]{->}(0,0)(-2,0)(2,1.25)
\uput[d](2,0){x}\uput[r](0,1.25){y}
\psGauss[sigma=0.5]{-1.75}{1.75}
\end{pspicture}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The \psGauss command is provided by the pst-func package. Refer to the manuals of pst-func, pstricks-add and at least pstricks for further information.


Thorsten
vdhvu
Posts: 3
Joined: Mon Mar 12, 2007 9:35 am

Re: PSTricks | Plot of a Gauss Curve

Post by vdhvu »

Thank you very much.
Post Reply