How could we fix the problem with the x-axis ? Also, would it be possible to have written above or in the middle of each column each number ? enter image description here

So as to make my bar chart, I have used the following code:



        width  = 0.85*\textwidth,
        height = 8cm,
        major x tick style = transparent,
        bar width=14pt,
        ymajorgrids = true,
        ylabel = {Deaths per 1,000 live births},
        symbolic x coords={World,Low income,Middle income, High income},
        xtick = data,
        scaled y ticks = false,
        enlarge x limits=0.25,
        legend cell align=left,
        legend style={
                anchor=south east,
                column sep=1ex
{(World,51) (Low income,95) (Middle income,46) (High income,6)};
{(World,63) (Low income,115) (Middle income,57) (High income,7)};
{(World,73) (Low income,133) (Middle income,67) (High income,7)};
{(World,87) (Low income,164) (Middle income,82) (High income,12)};
{2011,2005,2000, 1990}

1 Answer 1


I use option {axis}[nodes near coords, x tick label style={rotate=45,anchor=east},] , maybe you could try in your favor.

  1. nodes near coords add the value for every bars.
  2. x tick label style={rotate=45,anchor=east}, rotate your label with angle 45.

For the bar too wide, I think bar width=12pt is enough. enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .