我有一个简单的条形图。其中
\begin{tikzpicture}
\begin{axis}[
ybar,
axis lines*=left,
ymajorgrids,
bar width=0.26cm, width=0.45\textwidth,
ymin=0,
y tick label style={font=\footnotesize},
ylabel= Number ,
xtick=data,
nodes near coords,
x tick label style={font=\footnotesize,align=right,rotate=90},
every tick/.style={color=black, line width=0.35pt},
xticklabels from table={\datatable}{month},
enlarge x limits=0.1,
]
\addplot table [x expr=\coordindex, y index=2] {\datatable};
\end{axis}
\end{tikzpicture}
我的数据文件是:
month aa bb c
June 0 0 0
July 0 0 0
August 7 0 7
September 6 0 6
October 4 0 4
November 5 0 5
December 5 0 5
January 4 0 4
February 0 0 0
March 0 0 0
April 0 0 0
May 0 0 0
June 0 0 0
正如您所见,索引为 2 的列值为 0。结果图表为
在我的图表样式中,我设置了 ymin=0。但如您所见,它不起作用。
有什么解决办法吗?