|
From: Mark L. <bre...@ya...> - 2012-07-21 11:33:31
|
On 21/07/2012 05:15, Benjamin Root wrote: > On Fri, Jul 20, 2012 at 10:55 PM, C M <cmp...@gm...> 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 >> >> > Not automatically, but you can always manually break up a line of text with > a '\n' in the string. Automatic/intelligent line wrapping has always been > a requested feature, but would be very difficult to implement correctly. > Therefore, the recommendation is for manual usage of newlines. For the OP an example is here http://matplotlib.sourceforge.net/examples/pylab_examples/barchart_demo2.html > > Cheers! > Ben Root > > > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Cheers. Mark Lawrence. |