# I don't know, why does it not work (plot) [duplicate]

\documentclass{article}
\usepackage[a4paper,bindingoffset=0.2in,%
left=1in,right=1in,top=1in,bottom=1in,%
footskip=.25in]{geometry}
\usepackage[magyar]{babel}
\usepackage[utf8]{inputenc}
\usepackage{t1enc}
\usepackage{amsmath}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
x tick label style={
/pgf/number format/1000 sep=},
ylabel=Eltérés,
enlargelimits=0.2,
ybar interval=0.8,
]
coordinates {(1,25) (2,8.5)
(3,7.9) (4,3.8) (5,4.2) (6,7.7) (7,6.8) (8,3.2) (9,15.2) };

\end{axis}
\end{tikzpicture}

\end{document}

• Add another pair with (10,...). – Ignasi Feb 26 '17 at 19:33
• very big thank you, you saved my life, I can do my homework :) – Zsombor Feb 26 '17 at 19:35
• It does work, in the sense that pgfplots does as instructed. Are you actually after ybar, and not ybar interval=0.8? – Torbjørn T. Feb 26 '17 at 19:39
• You probably wanted an ybar and not an ybar interval. Read differences in pgfplots documentation. – Ignasi Feb 26 '17 at 19:39
• thank you, everithing is clear, I used ybar interval, because I saw it in an example – Zsombor Feb 26 '17 at 19:42

So if you want (9,15.2) to be shown, add another coordinate or change the plot to be ybar(without interval):

\documentclass{article}
\usepackage[a4paper,bindingoffset=0.2in,%
left=1in,right=1in,top=1in,bottom=1in,%
footskip=.25in]{geometry}
\usepackage[magyar]{babel}
\usepackage[utf8]{inputenc}
\usepackage{t1enc}
\usepackage{amsmath}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
x tick label style={
/pgf/number format/1000 sep=},
ylabel=Eltérés,
enlargelimits=0.2,
ybar,% interval=0.8,
]