![x 轴下方出现奇怪的伪影;标准形式数字的后半部分?我该如何摆脱它](https://linux22.com/image/363233/x%20%E8%BD%B4%E4%B8%8B%E6%96%B9%E5%87%BA%E7%8E%B0%E5%A5%87%E6%80%AA%E7%9A%84%E4%BC%AA%E5%BD%B1%EF%BC%9B%E6%A0%87%E5%87%86%E5%BD%A2%E5%BC%8F%E6%95%B0%E5%AD%97%E7%9A%84%E5%90%8E%E5%8D%8A%E9%83%A8%E5%88%86%EF%BC%9F%E6%88%91%E8%AF%A5%E5%A6%82%E4%BD%95%E6%91%86%E8%84%B1%E5%AE%83.png)
我有一个非常小规模的图表,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
]