I want to plot some data using pgfplot. Here is what I got for now:
\begin{tikzpicture}
\begin{axis}[
xlabel=X,
xmin = 0,
xtick = {1,2,3,4,8},
ylabel=Y,
enlargelimits=false
]
\addplot coordinates {
(1, 2000)
(2, 5000)
(3, 8000)
(4, 11000)
(8, 13000)
};
\addlegendentry{A}
\end{axis}
\end{tikzpicture}
The display is OK, but I do not want to have more space between 4 and 8 than between 1 and 2. I want the same space between each x tick.
Is that possible ?
Best Answer
You could change the
xtick
andxticklabels
as followswhich gives