Re: [Matplotlib-users] Clip text in bars

2010-05-27 Thread R Potter
Ah, thanks a lot. --- On Thu, 5/27/10, Jae-Joon Lee wrote: > From: Jae-Joon Lee > Subject: Re: [Matplotlib-users] Clip text in bars > To: "wrpd_mnd" > Cc: matplotlib-users@lists.sourceforge.net > Date: Thursday, May 27, 2010, 9:24 AM > The bbox needs to

Re: [Matplotlib-users] Clip text in bars

2010-05-27 Thread Jae-Joon Lee
The bbox needs to be in a proper coordinate. from matplotlib.transforms import TransformedBbox bb = TransformedBbox(rect[0].get_bbox(), ax.transData) Also, do not use clip_on when clip_box is used. clip_on override clip_box with ax.bbox. text0 = ax.text(0,11,'JobName', clip_box=bb) A complete c

[Matplotlib-users] Clip text in bars

2010-05-27 Thread wrpd_mnd
I'm trying to set up a chart that shows a runtime trace of a single frame. Most of it is straight forward, however one aspect of it is driving me crazy. I would like to label the inside of the bar fragments (each represent a function call with the x-extent being its runtime) with the name of the t