I'm using pgfplots to plot experimental data and there are currently way too many marks on the x-axis.
In the documentation I found the xtick distance-command, but LaTeX gives this error message:
I do not know the key '/tikz/xtick distance'
What am I doing wrong?
% 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}
pgfplotsyou have installed doesn't correspond to the version of the documentation you're reading, your example works fine here, with version 1.14 (the latest version).\pgfplotsversionwill print the version number, so you can add that to your document to see which version you have. – Torbjørn T. Nov 18 '16 at 21:56pgfplots1.14. Either way, I would recommend either completely rewriting this question, or deleting it altogether and post a new one about the installation issue. – Torbjørn T. Nov 18 '16 at 22:07xtick={3390,3400,...,3460}. – Torbjørn T. Nov 18 '16 at 22:11compat=1.5.... – Rmano Nov 18 '16 at 22:45xtick distancealtogether. And the OP also said that\pgfplotsversionprinted 1.12.1 ... – Torbjørn T. Nov 18 '16 at 22:47\pgfplotsset{compat=1.14, width=0.7\linewidth}in the preamble I should specify to use that version, unfortunately, LaTeX says > ! Package pgfkeys Error: Choice '1.14' unknown in choice key '/pgfplots/compat/ – Sam Nov 18 '16 at 22:51