[Tex/LaTex] Building a pgfplot bar chart with values above each bar

bar charthistogramtikz-pgf

It is the first time for me trying to build a bar chart. Obviously I am encountering some problems with that. The plot should have some space between bars. And the y-Values should be above each bar. Horizontal lines at each y-Axis values should also be part of the graph, but not the vertical ones. I am also encountering some problems with setting the width, so that the bars are always attached to each other. I would like to build such a plot:enter image description here

Could you please help me?

Best Answer

This can be done with pgfplots, starting point:

    axis x line*=bottom,
    axis y line*=none,
    every outer y axis line/.append style={draw=none},
    every y tick/.append style={draw=none},
    ytick={0, 20, ..., 120},
    y grid style={densely dotted, line cap=round},
    ylabel={Value in billion U.S. dollars},
    nodes near coords,
    ] coordinates {
      (1995, 8.02)
      (1996, 11.29)
      (1997, 15.07)
      (1998, 21.06)
      (1999, 54.91)
      (2000, 105)
      (2001, 40.94)