I am trying to plot a bar chart in LaTeX to be displayed as below
and the script I am referring to is as below:
\begin{filecontents}{data.csv}
A, B, C, D
5, 10, 17, 12
10, 9, 27, 21
15, 33, 33, 27
20, 32, 70, 69
25, 32, 102, 60
30, 44, 108, 57
35, 54, 123, 100
\end{filecontents}
\pgfplotstableread[col sep=comma,]{data.csv}\datatable
\begin{tikzpicture}
\begin{axis}[
ybar,
xlabel={A},
xtick=data,
xticklabels from table={\datatable}{A},
ylabel={}]
\addplot table [x expr=\coordindex, y={]{\datatable};
\end{axis}
\end{tikzpicture}
but it only displays one bar. I am very new to plotting charts in LaTeX hence any help on this will be much appreciate.
\documentclass{...
followed by preamble with packages related to your problem and ending with\end{document}
which we can copy to our computers and test.