1

My issue is that my x-axis tick labels are overlapping, as such I have a similar issue to the picture shown in this question: matplotlib: how to prevent x-axis labels from overlapping each other

The distinction is that my labels are not rotated like they're in this picture. And I'm not using plt but instead:

ax=pylab.figure().add_subplot(111)

I am creating a bar chart and I can set the width of the bars. Can I similarly set the width of the xticklabels?

E.g so the first tick label appears on the x-axis between 0 and 0.5, the second appears between 0.5 and 1.0 etc...

Community
  • 1
  • 1
Phoenix
  • 4,386
  • 10
  • 40
  • 55
  • 2
    Robert, can you give an image of the problem and better yet some minimal code with test data that reproduces the problem? This will increase the likelihood of someone being able to assist you. – Greg Jan 27 '14 at 13:14
  • The matplotlib docs describe how the ticks and labels can be configured. E.g. (http://matplotlib.org/api/pyplot_api.html?highlight=tick_params#matplotlib.pyplot.tick_params); the following examples may also help: http://matplotlib.org/examples/pylab_examples/major_minor_demo1.html, http://matplotlib.org/examples/pylab_examples/centered_ticklabels.html, http://matplotlib.org/examples/ticks_and_spines/ticklabels_demo_rotation.html – Bonlenfum Jan 27 '14 at 15:14

0 Answers0