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
|
\newcommand{\barplot}[5][]{%
\begin{tikzpicture}
\begin{axis}[
xlabel={#2},
ylabel={#3},
axis lines*=left,
width = \textwidth,
height = .3\textheight,
nodes near coords,
xtick=data,
x tick label style={},
ymin=0,
symbolic x coords={#4},#1 %any additional parameters for the axis can be given in the optional argument
]
\addplot+[ybar,lsRichGreen!80!black,fill=lsRichGreen] plot coordinates {
#5
};
\end{axis}
\end{tikzpicture}
}
\usepackage{pgfmath,pgfplotstable}
\newcommand{\langsciplot}[2]{%% experimental
\pgfplotstablegetcolsof{#1.csv}
\pgfmathsetmacro{\langscicsvlength}{\pgfplotsretval-1}
\begin{tikzpicture}[trim axis right,trim axis left]
\begin{axis}[
xtick=data,
axis lines*=left,
nodes near coords,
ymin=0,
width=\textwidth,
#2
]
\foreach \i in {0,...,\langscicsvlength} {
\addplot[
/pgf/number format/read comma as period
] table [x index={0},y index={\i}] {#1.csv};
}
\end{axis}
\end{tikzpicture}
}
\colorlet{tmnlpone}{lsDarkBlue}
\colorlet{tmnlptwo}{lsMidDarkBlue}
\colorlet{tmnlpthree}{lsMidBlue}
\colorlet{tmnlpfour}{lsLightBlue}
\colorlet{sidlone}{lsDarkGreenTwo}
\colorlet{sidltwo}{lsRichGreen}
\colorlet{sidlthree}{lsMidGreen}
\colorlet{sidlfour}{lsSoftGreen}
\colorlet{lvone}{lsDarkWine}
\colorlet{lvtwo}{lsMidWine}
\colorlet{lvthree}{lsLightWine}
\colorlet{lvfour}{lsRed}
\colorlet{silpone}{lsRed}
\colorlet{silptwo}{lsDarkOrange}
\colorlet{silpthree}{lsMidOrange}
\colorlet{silpfour}{lsLightOrange}
|