I was just curious if you can set up a bar graph with the xbar labels the name of the month.
My code works, however it is missing the last month (december) it could be a scaling problem but I do not think so. xmax=20 doesn't make the last numbers come up. It just scales the graph to about half (as 11/20 is almost half)
The file contains
Month Rain
January 22
... ...
But the problem is not with the file. I get the same problem with the following:
\addplot coordinates {(1,1)(2,2)(3,3)(4,4)(5,5)(6,6)(7,7)(8,8)(9,9)(10,10)(11,11)(12,12)};
Here is my code anyway, I commented out the words to make it easier.
Code: Select all
\begin{tikzpicture}[scale=1.5]
\begin{axis}[ybar, bar width=1, x tick label style={rotate=90}, ybar interval=1]
\addplot table [x=Month, y=Rain, col sep=comma] {data/AverageClimate.csv};
\addplot table[x=Month, y=Evaporation, col sep=comma] {data/AverageClimate.csv};
\end{axis}
\end{tikzpicture}
%symbolic x coords={February, March, April, May, June, July, August, September, October, November, December}
%xtick=data