我正在尝试在 Overleaf 中绘制图表。我使用的是网上找到的这个模板:
\begin{tikzpicture}
\begin{axis}[
title={C++ Threads performance},
xlabel={Number of particles},
ylabel={Time [ms]},
xtick={10,50,100,1000},
ytick={2317,3612,9122,85937},
legend pos=north west,
ymajorgrids=true,
grid style=dashed,
xmode=log,
log ticks with fixed point,
% for log axes, x filter operates on LOGS.
% and log(x * 1000) = log(x) + log(1000):
x filter/.code=\pgfmathparse{#1 + 6.90775527898214},
ymode=log,
log ticks with fixed point,
% for log axes, x filter operates on LOGS.
% and log(x * 1000) = log(x) + log(1000):
x filter/.code=\pgfmathparse{#1 + 6.90775527898214}
]
\addplot[
color=blue,
mark=square,
]
table {
0.002 1500
0.01 3676
0.02 4439
0.2 39850
1
};
\addlegendentry{2 threads}
\addplot[
color=green,
mark=square,
]
table {
0.002 2429
0.01 2636
0.02 2708
0.20 15570
1 93690
};
\addlegendentry{4 threads}
一切运行得很好,直到我决定在 x 轴上再添加一个刻度,
xtick={10,50,100,1000,5000},
问题是图表中没有显示 5000 个刻度: