# How to exclude negative values from plot of PGFPlots package?

I'm plotting bar plot using this code:

\documentclass[tikz,12pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{pgfplots}
\usetikzlibrary{pgfplots.groupplots}
\usepackage{xcolor}
\pgfplotsset{width=12cm,compat=1.9}
\tikzset{
%Define standard arrow tip
>=stealth'
}
\begin{document}
\pgfplotsset{every axis/.append style={
font=\normalsize\rmfamily,
line width=1 pt,
tick style={line width=.6pt}}}
\begin{tikzpicture}
\begin{axis}[
height=8cm,
ybar,
ymin=0,
bar width=1.2cm,
minor y tick num=4,
enlargelimits=0.15,
legend style={at={(0.5,-0.2)},
anchor=north,legend columns=-1},
ylabel={Count},
symbolic x coords={5--10 years,10--15 years, 15--20 years,20--25 years,Over 25 years},
xtick=data,
nodes near coords,
nodes near coords align={vertical},
x tick label style={font=\normalsize,text width=1.5cm,align=center},
]    \addplot[fill=green!25!gray] coordinates {(5--10 years,32) (10--15 years,12) (15--20 years,3) (20--25 years,2) (Over 25 years,3)};

\end{axis}
\end{tikzpicture}
\end{document}


I want to have y minimum equal to 0. I have set:

...
ymin=0,
...


But as you can see, it does not work.

And secondly. How to put values inside of the bar?

-
Remove the enlargelimits=0.15 if you don't want to enlarge the limits of the axis past the specified ymin value. To put the nodes inside the bars, use every node near coord/.append style={anchor=north}. –  Jake Jan 30 '14 at 18:14
Thank you! It works. But why enlargelimits=0.15 make such effect? –  saldenisov Jan 30 '14 at 19:14
@saldenisov: Because that's what enlargelimits is designed to do. From the pgfplots manual: "Axis limits can be increased automatically using the enlargelimits option." –  Paul Gessler Jan 30 '14 at 19:31
But if I need to use enlargelimits t effect x axis? What than should I do?Thank you. –  saldenisov Jan 30 '14 at 19:37

pgfplots, by default, uses enlargelimits=0.15 in all directions.
You can change this to enlarge x limits=0.15 to only enlarge the limits in x direction, which then looks like this:
where nodes near coords manages to expand the y axis enough to include the nodes, but enlarge x limits=0.15,enlarge y limits={value=0.15,upper}, gives the more equally spaced lower picture.