Could you help me using PSTricks to draw a bell-shaped curve with filling two tails as in the attached picture?
Thank you.
Document Classes ⇒ PSTricks | Plot of a Gauss Curve
PSTricks | Plot of a Gauss Curve
- Attachments
-
- Gauss.jpg (40.69 KiB) Viewed 10828 times
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
PSTricks | Plot of a Gauss Curve
This is not so complicated as it seems to be. All you need is the pstricks-add package and the pst-func package.
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
Code: Select all
\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}
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Re: PSTricks | Plot of a Gauss Curve
Thank you very much.