I have the following Tikz plot:


        ybar, axis on top,
        %title={Cumulative Progress of Works},
        height=8cm, width=14.5cm,
        bar width=0.4cm,
        ymajorgrids, tick align=inside,
        major grid style={draw=white},
        %enlarge y limits={value=.1,upper},
        ymin=0, ymax=100,
        axis x line*=bottom,
        axis y line*=right,
        y axis line style={opacity=0},
        %enlarge x limits=true,
        ylabel={Pourcentage (\%)},
        symbolic x coords={
       nodes near coords={
         % Uncomment to have number aboce data line
    \addplot [draw=none, fill=blue!30] coordinates {



However, the X axis line at the edge of the graph is way too long, how can I change it ? Thank you.

enter image description here


Uncomment enlarge x limits=true and change true to e.g. 0.02.

enter image description here

See section 4.14 of the PGFPlots manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.