x 轴下方出现奇怪的伪影;标准形式数字的后半部分?我该如何摆脱它

x 轴下方出现奇怪的伪影;标准形式数字的后半部分?我该如何摆脱它

我有一个非常小规模的图表,x 值从 0 到 0.001

它看起来是这样的:

在此处输入图片描述

我怎样才能摆脱那 10^-3?

\begin{tikzpicture}
    \begin{axis}[
        axis lines = center,
        axis line style = {-},
        xlabel = $$,
        ylabel = $$,
        xmin = 0,
        xmax = 0.001,
        clip=false,
        xtick = {0, 0.001},
        xticklabels = {,},
        ymin = -1,
        ymax = 1,
        ytick = {-1,0,1},
        height = 10em,
        width = 30em,
      ]
      \addplot [
        ybar,
        fill=blue,
        bar width=0.000005,
        draw=none,
      ]
      coordinates {
        (0,0.00928)
        (0.00002083333,0.23672)
        (0.00004166667,0.31467)
        (0.0000625,0.58179)
        (0.00008333333,0.46774)
        (0.0001041667,0.71017)
        (0.000125,0.45074)
        (0.0001458333,0.61990)
        (0.0001666667,0.30692)
        % ... many more coordinates
    };
  \end{axis}
\end{tikzpicture}

总共有 48 个酒吧。

答案1

如手册第 3.2.3 节所述,这是一个刻度刻度。它的存在是为了使 x 刻度可以用短值(如“1”、“2”……)而不是“0.001”、“0.002”……来标记,表明它们将被解释为 10^-3 倍。要删除它,只需将其添加scaled x ticks=false到轴规范中:

\begin{axis}[
    axis lines = center,
    axis line style = {-},
    xlabel = $$,
    ylabel = $$,
    xmin = 0,
    xmax = 0.001,
    clip=false,
    xtick = {0, 0.001},
    xticklabels = {,},
    ymin = -1,
    ymax = 1,
    ytick = {-1,0,1},
    height = 10em,
    width = 30em,
    scaled x ticks=false
  ]

相关内容