# [Tex/LaTex] How to fix the space between each x ticks in a pgfplot

pgfplotstikz-pgf

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
]

(1,   2000)
(2,   5000)
(3,   8000)
(4,   11000)
(8,   13000)
};
\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 ?

You could change the xtick and xticklabels as follows

  xtick = {1,2,3,4,5},
xticklabels = {1,2,3,4,8},


which gives

\documentclass{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=X,
xmin = 0,
xtick = {1,2,3,4,5},
xticklabels = {1,2,3,4,8},
ylabel=Y,
enlargelimits=false
]