Re: [Matplotlib-users] get bboxes of bars in data coordinates

2011-03-28 Thread C M
On Mon, Mar 28, 2011 at 1:44 PM, C M wrote: > I need to get the bboxes for time-range bars (matplotlib.patches.Rectangle > objects) on a bar plot for a custom autoscaling function. > > Right now, I get them like this, where rectObj = a bar and bboxes = a list > of bboxes: > > bboxes.append(rectOb

Re: [Matplotlib-users] get bboxes of bars in data coordinates

2011-03-28 Thread C M
I should add, I can see that (I think) this needs to use a transform to get it in data coordinates, because if I do this to each rectObj (each bar): trans = rectObj.get_patch_transform() print 'trans is: ', trans I get: trans is: BboxTransformTo(Bbox(array([[ 734189.52541214, 730844.],

[Matplotlib-users] get bboxes of bars in data coordinates

2011-03-28 Thread C M
I need to get the bboxes for time-range bars (matplotlib.patches.Rectangle objects) on a bar plot for a custom autoscaling function. Right now, I get them like this, where rectObj = a bar and bboxes = a list of bboxes: bboxes.append(rectObj.get_path().get_extents()) print 'bboxes is: ', bboxes H