当值接近于零时,如何将 ymin 移至零?

当值接近于零时,如何将 ymin 移至零?

ymin当值接近零时,如何移至零?我也尝试了ymin=0命令,但它不起作用。

\begin{figure}[h]
\centering
\begin{tikzpicture}
\begin{axis}[
ybar, ymax=4,
enlargelimits=0.15,
legend style={at={(0.5,-0.20)},
anchor=north,legend columns=-1},
ylabel={Surface Roughness (nm)},
xlabel={Substrate},
symbolic x coords={Glass,Silicon,PEN},
xtick=data,
nodes near coords,
nodes near coords align={vertical},
]
\addplot [fill= white] coordinates {(Glass,2.4) (Silicon,1.1) (PEN,1.8)};
\addplot [fill = black] coordinates  {(Glass,1.1) (Silicon,0.2) (PEN,1.0)};

\legend{Profilometer,AFM}
\end{axis}
\end{tikzpicture} 
\caption{Substrate Vs IBD Surface Roughness(Avg)}
\label{Subvibd}
\end{figure}

答案1

删除enlargelimits=0.15并再次引入ymin=0,将使 y 轴从 开始0

相关内容