summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-graphics-companion/4-7-4.ltx
blob: cd988e015fca747ab7a3d0c1ab242802746af0dd (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
\documentclass{ppex}
\nonstopmode
\usepackage {pstcol,calc}
\pagestyle{empty}

\begin{document}
\ResetPreambleCommands
\ReadyForTheFray
\usepackage {pstcol,calc}
\newcounter{lastval}
\newcounter{thishalf}
\newcounter{thisval}
\definecolor{wheat}{rgb}{.96, .87, .7}
\definecolor{lightblue}{rgb}{.68, .85, .9}
\definecolor{brown}{rgb}{.65, .16, .16}
\definecolor{pink}{rgb}{1, .75, .8}
\definecolor{palegreen}{rgb}{.6, .98, .6}
\definecolor{white}{rgb}{1, 1, 1 }
\newcommand\lang[4]{% name, value, percentage, color
 \setcounter{thisval}{\value{lastval}}
 \addtocounter{thisval}{#3}
 \pswedge[fillcolor=#4]{1}{\thelastval}{\thethisval}%
 \setcounter{thishalf}{((\value{thisval}-\value{lastval})/2)+\value{lastval}}
 %\typeout{#1: \thethishalf}%
 \ifnum#3>200\rput(1.3;\thethishalf){#1}\fi
 \setcounter{lastval}{\value{thisval}}
}
\bgroup\psset{unit=3}
\centerline{\begin{pspicture}(-1.3,-1.3)(1.3,1.3)
\psset{fillstyle=solid}
\degrees[10000]
\SpecialCoor
\setcounter{lastval}{0}
\lang{Romanian}{1}{3}{green}
\lang{Czech}{2}{6}{blue}
\lang{Bulgarian}{4}{11}{green}
\lang{Japanese}{4}{11}{palegreen}
\lang{Dutch}{7}{20}{black}
\lang{Norwegian}{20}{56}{cyan}
\lang{Greek}{26}{73}{magenta}
\lang{Swedish}{34}{95}{lightgray}
\lang{Danish}{46}{129}{white}
\lang{French}{83}{232}{pink}
\lang{Latin}{146}{409}{wheat}
\lang{Russian}{243}{680}{white}
\lang{Italian}{391}{1093}{gray}
\lang{German}{508}{1421}{lightblue}
\lang{unknown}{599}{1676}{red}
\lang{English}{1462}{4085}{yellow}
\end{pspicture}}
\egroup
\end{document}