Pgfplots: 축 승수 기호를 변경하는 방법

Pgfplots: 축 승수 기호를 변경하는 방법

x축을 곱하는 기호를 수동으로 정의하고 싶습니다. 어떻게 해야 그렇게 되나요?

예를 들어, 과학적 표기법 $\cdot 10^2$ 대신 $\cdot \Delta_x$를 사용하고 싶습니다.

답변1

pgfplots실제로 (TikZ를 기반으로 구축되었지만 TikZ와 동일하지 않음) 에 대해 이야기하고 있다고 가정하면 xtick scale label code/.code={$\cdot \Delta_{x}$}.

여기에 이미지 설명을 입력하세요

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
  domain=0:1e9,samples=2,
  xtick scale label code/.code={$\cdot \Delta_{x}$}
]
\addplot {1};
\end{axis}
\end{tikzpicture}
\end{document}

또는 이러한 레이블을 끄고 노드를 수동으로 배치할 수 있습니다.

여기에 이미지 설명을 입력하세요

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
  domain=0:1e9,samples=2,
  xtick scale label code/.code={},
  name=ax
]
\addplot {1};
\end{axis}
\node [below left] at (ax.outer south east) {$\cdot \Delta_{x}$};
\end{tikzpicture}
\end{document}

관련 정보