# Bars with tikzpicture not proportional

I am trying to create a xbar diagram with pgfplots package. But the bars are not propotional to each other. Here is a minimal example:

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
y axis line style = { opacity = 0 },
axis x line       = none,
tickwidth         = 0pt,
ytick={1,2},
yticklabels={1,2},
xbar,
nodes near coords,
nodes near coords align={horizontal}
]
(1000,2)
(500,1)
};
\end{axis}
\end{tikzpicture}
\end{document}


If I change the value of 1 to 1,000 they are the same size. But why is the bar not half the size of 2 if the value is half the size of 2?

You should add xmin=0:

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
y axis line style = { opacity = 0 },
axis x line       = none,
tickwidth         = 0pt,
ytick={1,2},
yticklabels={1,2},
xbar,
nodes near coords,
nodes near coords align={horizontal},
xmin = 0
]