summaryrefslogtreecommitdiff
path: root/info/examples/PSTricks_6_de/36-00-31.ltx
blob: 5cfb856c2d46f2cda937e25e51342eefe9361ad8 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%% 
%%  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{352.81416pt}
\setlength\parindent{0pt}
\usepackage[utf8]{inputenc}
\StartShownPreambleCommands
\usepackage{pstricks,pst-grad,multido}
\definecolor{lw}{rgb}{0.975,0.975,0.975}
\definecolor{db}{rgb}{0.7,0.3,0.3}
%
\newdimen\vPos%
\newdimen\vPosII%
\newdimen\vPosIII%
%
% balkenI[<fillstyle/color>](<length>), default is gradient blue
% vertical position is controlled by \vPos
\makeatletter
\def\balkenI{\@ifnextchar[{\@balkenIi}{%
\@balkenIi[fillstyle=gradient,gradbegin=white,%
gradend=blue,gradmidpoint=0,gradangle=90]%
}
}
\def\@balkenIi[#1](#2){%
\vPosII=\vPos\advance\vPosII by 0.4cm%
\psframe[#1](0,\vPos)(#2,\vPosII)%
\advance\vPos by -0.5cm%
}
\makeatother
%
% balken(<xStart>)(<xEnd>)
\def\balkenII(#1)(#2){%
\advance\vPosII by -0.35cm%
\vPosIII=\vPosII\advance\vPosIII by 0.25cm
\psframe[fillstyle=solid,fillcolor=db](#1,\vPosII)(#2,\vPosIII)%
}
\def\setText#1{%
\rput[rB](-0.2,\vPos){#1}%
\advance\vPos by -0.5cm%
}

\StopShownPreambleCommands
\begin{document}
\begin{pspicture}(-4,-1)(9,11)
\vPos=0cm
\psframe[fillcolor=lw,fillstyle=solid](0,0)(8,9)
\multido{\n=1+1}{5}{%
	\rput(\vPos,9.3){\n}%
	\psline[linestyle=dashed,linewidth=0.1pt](\vPos,-0.1)(\vPos,9.1)%
	\advance\vPos by 2cm%
}
\vPos=0cm
\multido{\n=-2+1}{5}{
	\rput(\vPos,-0.3){\n}
	\advance\vPos by 2cm%
}
\rput(0,10){v\"ollig unwichtig}\rput(8,10){wichtig}%
\rput(0,-1){viel schlechter}\rput(4,-1){kein Unterschied}\rput(8,-1){viel besser}%
%
% ... the text ...
\vPos=10.7cm
\balkenI(0.3)
\rput[lB](0.5,10.75){Wichtigkeit beim Einkauf von Lebensmitteln}
%
\vPos=8.65cm
\setText{Geschmack}
\setText{Artgerechte Tierhaltung}
\setText{Gesungheitsaspekt}
\setText{Frische und Reife}
\setText{Glaubw\"urdige Produktkennzeichnung}
\setText{Preis-/Leistungsverh\"altnis}
\setText{Vitamin- und Mineralstoffreichtum}
\setText{Schonende Verarbeitung}
\setText{Naturbelassenheit}
\setText{Freiheit von Gentechnik}
\setText{Umweltfreundlichkeit der Verpackung}
\setText{Appetitliches \"Außeres}
\setText{Herkunft aus regionalem Landbau}
\setText{Regionale Herkunft}
\setText{Niedriger Preis}
\setText{Haltbarkeit}
\setText{Einfach und bequem bei Zubereitung}
\setText{Kalorienarmut}
\balkenII(0,-1.8)(0.3,-1.5)\rput[lB](0.5,-1.8){Vergleich der \"Okoprodukte zu den herk\"ommlichen}
%
% ...the bars ...
\vPos=8.6cm% the highest bar
\balkenI(6.8)	\balkenII(4)(6.2)
\balkenI(6.8)	\balkenII(4)(6.8)
\balkenI(6.8)	\balkenII(4)(6.6)
\balkenI(6.8)	\balkenII(4)(6)
\balkenI(6.6)	\balkenII(4)(5)
\balkenI(6.6)	\balkenII(4)(3.8)
\balkenI(6.3)	\balkenII(4)(6.3)
\balkenI(6.3)	\balkenII(4)(5.6)
\balkenI(6.3)	\balkenII(4)(6.6)
\balkenI(6)		\balkenII(4)(6)
\balkenI(6)		\balkenII(4)(5.8)
\balkenI(5.9)	\balkenII(4)(4.8)
\balkenI[fillstyle=solid,fillcolor=green](5.5)
\balkenI(5.3)	\balkenII(4)(5.8)
\balkenI(5)		\balkenII(3)(4)
\balkenI(4.8)	\balkenII(4)(4.15)
\balkenI(4.6)	\balkenII(4)(4.6)
\balkenI(4.3) 	\balkenII(4)(4.9)
% \psgrid only to view coordinates
%\psgrid[griddots=10,gridlabels=7pt,subgriddiv=0]
\end{pspicture}
\end{document}