\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}