You might want to look at the python textwrap module. That can take your labels and automatically wrap them at a certain column width. See (in addition to the official python docs) http://www.doughellmann.com/PyMOTW/textwrap/
Jon On Fri, 2012-07-20 at 23:55 -0400, C M wrote: > How possible would it be to wrap y axis tick labels after a certain > text length? I have a horizontal bar plot where some bars' labels are > too long and therefore cut off. I can scrunch the width of the whole > plot to accommodate them, but I'd much rather wrap long text and allow > a little more space to accommodate two lines. For examples: > > I'd like to go from this: > > a short axis label | ====================== > > A very long axis label that gets cut off | ============= > > > To this: > a short axis label | ====================== > > A very long axis label | ============= > that gets cut off > > > Is this possible or has it ever been done? > > Thanks, > Che > > -- ______________________________________________________________ Jonathan D. Slavin Harvard-Smithsonian CfA jsla...@cfa.harvard.edu 60 Garden Street, MS 83 phone: (617) 496-7981 Cambridge, MA 02138-1516 cell: (781) 363-0035 USA ______________________________________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users