summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pstricks-examples-en/02-07-1.ltx
blob: e33958229f75a34d9d4395a785a1f1b89f1bc047 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
%% 
%%  A DANTE-Edition example
%% 
%% 
%%  Copyright (C) 2011 Herbert Voss
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 
%% 
%% ==== 
% Show page(s) 1
%% 
\documentclass[]{article}
\pagestyle{empty}
\setlength\textwidth{201.70511pt}
\setlength\parindent{0pt}

\usepackage{pst-plot,pst-func}
\newcommand*\plot[3][linecolor=black]{%
  \pstVerb{/lambda #2 def }
  \psplot[#1]{0}{#3}{ x Func }%
}
\pstVerb{/Func { % x has to be on top of the stack
  lambda mul neg Euler exch exp lambda mul } def }

\begin{document}
\psset{yunit=3cm,xunit=2cm}
\begin{pspicture}(4,2.5)
  \psaxes{->}(4,2.5)
  \plot[linewidth=1.5pt,linecolor=red]{2}{3.8}
  \psline[linestyle=dashed](!0 .5 Func)(!.5 dup Func)(0.5,0)
  \rput[lb](! .6 .5 Func){\psPrintValue{0.5 Func}}
  \rput(2,2){$f(x)=\lambda\cdot e^{-\lambda x}$}
\end{pspicture}
\end{document}