I am beginner in using pgfplots package, I am trying to edit this example but seriously it was hard for me to understand what is the purpose of each parameter in the code like how can I change the color with a certain bar in HTML or any other format. How can I control the number and the value of each column in the chart? how can I control the exact position of the legend? Please if you have any resources could explain this in easy way for beginners suggest it to me.
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=newest}
\begin{document}
\begin{tikzpicture} \begin{axis}
[ x tick label style={ /pgf/number format/1000 sep=},
ylabel=Population,
enlargelimits=0.05,
legend style={at={(0.5,-0.15)},
anchor=north,legend columns=-1},
ybar interval=0.7, ]
\addplot
coordinates {(1930,50e6) (1940,33e6) (1950,40e6) (1960,50e6) (1970,70e6)};
\addplot
coordinates {(1930,38e6) (1940,42e6) (1950,43e6) (1960,45e6) (1970,65e6)};
\addplot
coordinates {(1930,15e6) (1940,12e6) (1950,13e6) (1960,25e6) (1970,35e6)};
\legend{Far,Near,Here}
\end{axis}
\end{tikzpicture}
\end{document}
Thank you
10^7is there because your y-coordinates are of the order10^7. E.g.50e6is5\cdot 10^7. – Apr 05 '18 at 20:47\pgfplotsset{width=7cm}. – Apr 05 '18 at 21:31