Debian Codegraph @

texmf-dist/doc/latex/bardiag/figs/examp6.tex

raw
1 \def\onecol{red}
2 \def\onetopcol{blue}
3 \def\twocol{red}
4 \def\twotopcol{blue}
5 \def\threecol{red}
6 \def\threetopcol{blue}
7 %-------------------------------------------------------
8 %This is the way to redefine styles
9 % \newpsstyle{mytickstyle}{linewidth=1pt,linecolor=blue}
10 %
11 % Style of the foreground frame
12 \newpsstyle{diagframestyle}{linewidth=1pt,linecolor=black,fillcolor=white}
13 % Style of the background frame
14 \newpsstyle{diagbgframestyle}{linewidth=1pt,linecolor=black,fillcolor=yellow}
15
16 % Use 3D bars
17 \renewcommand{\ActiveBarPrimitive}{\barTDRect}
18 % Make frame 3D
19 \renewcommand{\frameTD}{1}
20
21 % Put ticks and levellines each 10 yunits
22 \renewcommand{\betweenticks}{10}
23
24 % Color of the numbers on the bar-items
25 \renewcommand\numbercolor{\white\bf}
26 % Where to put the number. Can be \bottom,\belowtop,\overtop
27 \renewcommand{\placenumber}{\bottom}
28
29 \renewcommand{\tdx}{1.2} % depth of 3d
30 \renewcommand{\tdy}{6}
31
32 % Start the diagram
33 \bardiagrambegin{14}{100}{2cm}{1}{5}{0.8cm}{0.1cm}
34 \baritem{1990}{32}{\onecol}
35 \subtopbaritem{}{40}{\onetopcol}
36 \subbaritem{2000}{20}{\twocol}
37 \subtopbaritem{}{30}{\twotopcol}
38 \subbaritem{2010}{13}{\threecol}
39 \subtopbaritem{}{50}{\threetopcol}
40 %---
41 \baritem{1990}{21}{\onecol}
42 \subtopbaritem{}{60}{\onetopcol}
43 \subbaritem{2000}{25}{\twocol}
44 \subtopbaritem{}{64}{\twotopcol}
45 \subbaritem{2010}{58}{\threecol}
46 \subtopbaritem{}{32}{\threetopcol}
47 %---
48 \baritem{1990}{22}{\onecol}
49 \subtopbaritem{}{19}{\onetopcol}
50 \subbaritem{2000}{12}{\twocol}
51 \subtopbaritem{}{18}{\twotopcol}
52 \subbaritem{2010}{9}{\threecol}
53 \subtopbaritem{}{12}{\threetopcol}
54 \drawlevellines
55 % Legend
56 % Let's make the background white
57 % and gray frame-line of 0.5pt
58 \diagLegendoptions{white}{gray}{0.5pt}
59 %
60 \renewcommand{\legendShadowColor}{darkyellow}
61 %
62 \diagLegendbegin{12}{65}{3}
63 \diagLegenditem{girls}{\onecol}
64 \diagLegenditem{boys}{\onetopcol}
65 \diagLegendend
66 % End of the legend
67 \setlength{\captionoffset}{2cm}
68 \bardiagramend{\parbox{11cm}{{\centering \large Year\\[0.3cm]
69 \hspace{-1cm}
70 \begin{tabular}{p{3.2cm}p{4.0cm}p{3.2cm}}
71 \centering Alpha's & \centering Beta's & \centering Gamma's
72 \end{tabular}
73 }}}
74 {\large Graduated (\%)}
75
76