
실험 데이터를 플롯하는 데 사용하고 있는데 pgfplots
현재 표시에 너무 많은 표시가 있습니다.엑스-중심선.
문서에서 xtick distance
-command를 찾았지만 LaTeX에서는 다음 오류 메시지를 표시합니다.
'/tikz/xtick 거리' 키를 모릅니다.
내가 도대체 뭘 잘못하고있는 겁니까?
% Preamble
\usepackage{pgfplots}
\pgfplotsset{compat=1.5, width=0.7\linewidth}
% Code
\begin{tikzpicture}
\begin{axis}[
xtick distance=10,
xlabel={Magnetic field [\si{G}]},
ylabel={EPR-Signal [\si{a.u.}]},
xmin=3390, xmax=3460,
]
\addplot[black] table {...};
\addplot[red] table {...};
\legend{Experiment,Simulation}
\end{axis}
\end{tikzpicture}
답변1
의견에 따르면 여기서 문제는 버전 1.14의 매뉴얼을 읽고 있는 반면 LaTeX를 설치한 실제 버전은 키가 xtick distance
구현되지 않은 1.12.1이라는 것입니다. 대신 를 사용하여 xtick={3390,3400,...,3460}
눈금 위치를 지정할 수 있습니다.
터미널/명령 프롬프트에서 수행하면 올바른 수동 버전을 얻을 가능성이 높으며 texdoc pgfplots
, 그렇지 않은 경우 다음에서 얻을 수 있습니다.https://sourceforge.net/projects/pgfplots/files/pgfplots/1.12.1/.
어떻게든 버전 1.14를 설치하려고 시도한 것 같습니다. 설치 문제에 대한 도움이 필요한 경우 시스템에 대한 자세한 내용과 함께 새로운 질문을 해주세요. 간단히 TeX Live 2016으로 업그레이드하는 것을 고려할 수 있습니다(참조:Debian이나 Ubuntu에 "vanilla" TeXLive를 설치하는 방법은 무엇입니까?Ubuntu와 유사한 배포판을 사용하는 경우).
\documentclass{article}
\usepackage{pgfplots,siunitx}
\pgfplotsset{compat=1.12, width=0.7\linewidth}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xtick={3390,3400,...,3460},
xlabel={Magnetic field [\si{G}]},
ylabel={EPR-Signal [\si{a.u.}]},
xmin=3390, xmax=3460,
]
\addplot coordinates {(3400,0)(3450,0)};
\legend{Experiment}
\end{axis}
\end{tikzpicture}
\end{document}