pgfplot yticks 缺失,具体取决于 ymin 和 ytickdistance 的值

pgfplot yticks 缺失,具体取决于 ymin 和 ytickdistance 的值

我有以下最小的例子:

\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\definecolor{mycolor1}{rgb}{0.85000,0.32500,0.09800}%
\definecolor{mycolor2}{rgb}{0.92900,0.69400,0.12500}%
\begin{tikzpicture}

\begin{axis}[%
width=2in,
height=2in,
scale only axis,
unbounded coords=jump,
xmin=0,
xmax=4.5,
xlabel style={font=\color{white!15!black}},
xlabel={$x$},
ymin=-4237345,
ymax=-4237305,
ylabel style={font=\color{white!15!black}},
ylabel={$y$},
axis background/.style={fill=white},
xmajorgrids,
ymajorgrids,
legend style={legend cell align=left, align=left, draw=white!15!black},
ymajorgrids=true,
yminorgrids=true,
ytick distance=4,
%enlarge y limits=false,
%minor tick num=1,
yticklabel style={
/pgf/number format/fixed,
/pgf/number format/precision=6,
}
]

\addplot [color=mycolor2, line width=2.0pt]
  table[row sep=crcr]{%
0.415264299988747   -4237327.44636822\\
0.607710799992085   -4237327.44636822\\
0.813998899996281   -4237327.44636822\\
1.00737940001488    -4237327.44636822\\
1.20742489999533    -4237327.44636822\\
1.40818629997969    -4237320.19994611\\
1.61001700001955    -4237320.9231228\\
1.81117919999361    -4237321.27764833\\
2.0120802000165 -4237321.5149824\\
2.21387559998035    -4237321.66639327\\
2.41474339997768    -4237321.77862311\\
2.61432539999485    -4237321.8432339\\
2.81402920001745    -4237321.90728768\\
3.01396719998121    -4237321.95081875\\
3.21405519998074    -4237322.01022492\\
};

\end{axis}

\end{tikzpicture}%
\end{document}

缺失 yticks

看起来像上面的图片。几乎有一半的 yticks 都消失了。然后,当我将 ymin 值更改为 ymin=-4237333 并将 ytick 更改为 ytick distance=2 时,情况变得更糟,所有 yticks 都消失了。

在此处输入图片描述

因此,对于 ymin/ymax 和 ytick 距离的某些组合,刻度不会呈现。我遗漏了什么?

最小示例的链接:https://www.latex4technics.com?note=zzvvm5

相关内容