summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pstricks-examples/15-08-7.ltx
blob: 22e3004dea8f1efd82b61eead74464236092c1e1 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
%% 
%%  Ein Beispiel der DANTE-Edition
%% 
%% 
%%  Copyright (C) 2010 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[]{exaarticle}
\pagestyle{empty}
\setlength\textwidth{190.324pt}
\setlength\parindent{0pt}
\def\data{
(A, 10, 5.2, a)
(Amerika, 10, 5.2, b)
(B, 12, 3.8, c)
(C, 32.21, .54, d)
(De, 12.32, 74.3, nnn)
(E, 12.2, 12, NN)
(F, 123, 1.2, 34)
}
\StartShownPreambleCommands
\usepackage{pst-plot}
\SpecialCoor
\makeatletter
\def\pshlabel#1{}
\def\psErrorPlot{\pst@object{psErrorPlot}}
\def\psErrorPlot@i#1{\begin@SpecialObj\expandafter\psErrorPlot@ii#1}
\def\psErrorPlot@ii #1{\pst@cntc=1\psErrorPlot@iii#1}
\def\psErrorPlot@iii(#1,#2,#3,#4){%  die fünf Werte pro Satz
  \psline[style=barstyle](\the\pst@cntc,0)(\the\pst@cntc,#2)%
  \psline[style=errorstyle](\the\pst@cntc,#2)(!\the\pst@cntc\space #2 #3 add)
  \uput[-90](\the\pst@cntc,0){\strut#1}% #1 Beschriftung
  \uput[90](!\the\pst@cntc\space #2 #3 add){\small #4}% #5 Beschriftung
  \advance\pst@cntc by 1 % Eine EInheit weiter nach rechts
  \@ifnextchar({\psErrorPlot@iii}{\end@SpecialObj}% noch Daten da?
}
\newpsstyle{errorstyle}{arrows=-|,arrowscale=2,
  linewidth=1pt,linecolor=red}% Stil für den Fehlerbalken
\newpsstyle{barstyle}{linewidth=5mm}% Stil für den Balken
\makeatother
\StopShownPreambleCommands
\begin{document}
\psset{yunit=0.05}
\psframebox{%
\begin{pspicture}(-4\pslabelsep,-3\pslabelsep)(10,130)
  \psaxes[Dy=20,dy=20\psyunit](0,0)(10,120)
  \psErrorPlot{\data}
\end{pspicture}}
\end{document}