更改轴指数上的尾数分隔符

更改轴指数上的尾数分隔符

我有以下乳胶代码生成图。我想将科学计数法尾数 sep 更改为\timesnot cdot,这用于 y 轴 (x10-4)。我不希望所有其他数字也采用科学计数法。 错误的科学记数法图 我试过了\pgfkeys{/pgf/number format/sci generic/mantissa sep=\times} ,但没有效果。我需要改变什么

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.5}
\begin{document}
\definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}%
\definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}%
\begin{tikzpicture}
\pgfkeys{/pgf/number format/sci generic/mantissa sep=\times}

\begin{axis}[%
width=(\hsize/2),
height=(\hsize/2),
scale only axis,
xmin=0,
xmax=0.5,
xlabel near ticks,
xlabel={Density $\lambda$},
ymin=0,
ymax=0.00035,
ylabel near ticks,
ylabel={Rate, ($s^{-1}$)},
axis x line*=bottom,
axis y line*=left,
xmajorgrids,
ymajorgrids,
legend style={legend cell align=left, align=left}
]
\addplot [color=mycolor1, mark=o, mark options={solid, mycolor1}]
  table[row sep=crcr]{%
1e-05   0.000349984346613178\\
0.0250095   0.000294763280950208\\
0.100008    0.000223262905327838\\
0.1750065   0.000189761632377871\\
0.250005    0.000168814588345592\\
0.3250035   0.000153988764794569\\
0.400002    0.000142726344312675\\
0.4750005   0.000133766561301556\\
0.5 0.000131160050335831\\
};\label{rate_plot}
\addlegendentry{Rate}

\end{axis}

\end{tikzpicture}%

\end{document}

如同pgfplots:在绘图轴上使用 \times 符号表示科学计数法

答案1

.10更改为的关键与 PGFPlots 文档中的 4.15.3 Tick Scaling - Common Factors In Ticks 中一样x10tick scale binop=\times

修正后的代码:

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.5}
\begin{document}
\definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}%
\definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}%
\begin{tikzpicture}

\begin{axis}[%
width=(\hsize/2),
height=(\hsize/2),
scale only axis,
xmin=0,
xmax=0.5,
xlabel near ticks,
xlabel={Density $\lambda$},
ymin=0,
ymax=0.00035,
ylabel near ticks,
ylabel={Rate, ($s^{-1}$)},
axis x line*=bottom,
axis y line*=left,
xmajorgrids,
ymajorgrids,
legend style={legend cell align=left, align=left},
tick scale binop=\times
]
\addplot [color=mycolor1, mark=o, mark options={solid, mycolor1}]
  table[row sep=crcr]{%
1e-05   0.000349984346613178\\
0.0250095   0.000294763280950208\\
0.100008    0.000223262905327838\\
0.1750065   0.000189761632377871\\
0.250005    0.000168814588345592\\
0.3250035   0.000153988764794569\\
0.400002    0.000142726344312675\\
0.4750005   0.000133766561301556\\
0.5 0.000131160050335831\\
};\label{rate_plot}
\addlegendentry{Rate}

\end{axis}

\end{tikzpicture}%

\end{document}

相关内容