summaryrefslogtreecommitdiff
path: root/info/examples/PSTricks_en/02-06-1.ltx
diff options
context:
space:
mode:
Diffstat (limited to 'info/examples/PSTricks_en/02-06-1.ltx')
-rw-r--r--info/examples/PSTricks_en/02-06-1.ltx39
1 files changed, 39 insertions, 0 deletions
diff --git a/info/examples/PSTricks_en/02-06-1.ltx b/info/examples/PSTricks_en/02-06-1.ltx
new file mode 100644
index 0000000000..e33958229f
--- /dev/null
+++ b/info/examples/PSTricks_en/02-06-1.ltx
@@ -0,0 +1,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}