From: C M <cmp...@gm...> - 2011-03-29 02:41:22
|
On Mon, Mar 28, 2011 at 1:44 PM, C M <cmp...@gm...> 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(rectObj.get_path().get_extents()) > print 'bboxes is: ', bboxes > OK, I have it... Because I was using the above to get the bbox for a Line2D object, I didn't realize there was already a method to get the bbox (in data coordinates) from a Rectangle: rectObj.get_bbox() -Che |