如何在y轴上固定重叠标签-Latex

时间:2019-04-17 15:02:32

标签: latex tikz

我在Latex(tikzpicture)中创建了一个简单的图,并且在y轴上有些标签重叠,如您在图片中看到的

enter image description here

\begin{figure}[h!]
\centering
  \begin{tikzpicture}
    \begin{axis}[
      title=\textbf{example},
      ybar,
      width=10cm, height=5cm, bar width=30pt,
      enlargelimits=0.5,
      symbolic x coords={2013,2014,2015,2016}, xtick={2013,2014,2015,2016},
      ytick=data,
      ]
      \addplot coordinates
      {(2013,794) (2014,1208) (2015,1183) (2016,1259)};
    \end{axis}
  \end{tikzpicture}
\end{figure}

如何解决此问题,我不想使图表更高?

1 个答案:

答案 0 :(得分:0)

我建议信任-Wsign-conversion创建可读的轴标签,而不要人工干预:

pgfplots

enter image description here

如果您确实需要显示确切的数值,则图可能不是合适的可视化形式,而表格可能更适合。