Feed on

To make long axis labels automatically wrap, use the textwrap module:

import textwrap
import pylab
wrap_label_string = ‘\n’.join(textwrap.wrap(mylabel_string,30))

Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.