Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 669153a

Browse files
committed
applied Mattias get_bounds patch
svn path=/branches/v0_99_maint/; revision=8173
1 parent 4f6f588 commit 669153a

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

doc/users/artists.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ interactive session illustrating what is going on:
419419
# and notice that the ax.add_patch method has set the axes
420420
# instance
421421
In [267]: print rect.get_axes()
422-
Subplot(49,81.25)
422+
Axes(0.125,0.1;0.775x0.8)
423423

424424
# and the transformation has been set too
425425
In [268]: print rect.get_transform()
@@ -434,7 +434,7 @@ interactive session illustrating what is going on:
434434
(0.0, 1.0)
435435

436436
# but the data limits have been updated to encompass the rectangle
437-
In [271]: print ax.dataLim.get_bounds()
437+
In [271]: print ax.dataLim.bounds
438438
(1.0, 1.0, 5.0, 12.0)
439439

440440
# we can manually invoke the auto-scaling machinery

lib/matplotlib/backends/backend_wxagg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _clipped_image_as_bitmap(image, bbox):
171171
"""
172172
Convert the region of a wx.Image bounded by bbox to a wx.Bitmap.
173173
"""
174-
l, b, width, height = bbox.get_bounds()
174+
l, b, width, height = bbox.bounds
175175
r = l + width
176176
t = b + height
177177

@@ -238,7 +238,7 @@ def _WX28_clipped_agg_as_bitmap(agg, bbox):
238238
239239
Note: agg must be a backend_agg.RendererAgg instance.
240240
"""
241-
l, b, width, height = bbox.get_bounds()
241+
l, b, width, height = bbox.bounds
242242
r = l + width
243243
t = b + height
244244

lib/matplotlib/finance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,8 @@ def volume_overlay3(ax, quotes,
597597
maxy = max([volume for d, open, close, high, low, volume in quotes])
598598
corners = (minpy, miny), (maxx, maxy)
599599
ax.update_datalim(corners)
600-
#print 'datalim', ax.dataLim.get_bounds()
601-
#print 'viewlim', ax.viewLim.get_bounds()
600+
#print 'datalim', ax.dataLim.bounds
601+
#print 'viewlim', ax.viewLim.bounds
602602

603603
ax.add_collection(barCollection)
604604
ax.autoscale_view()

lib/matplotlib/patches.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,12 +1383,12 @@ def bbox_artist(artist, renderer, props=None, fill=True):
13831383
pad = props.pop('pad', 4)
13841384
pad = renderer.points_to_pixels(pad)
13851385
bbox = artist.get_window_extent(renderer)
1386-
l,b,w,h = bbox.bounds
1387-
l-=pad/2.
1388-
b-=pad/2.
1389-
w+=pad
1390-
h+=pad
1391-
r = Rectangle(xy=(l,b),
1386+
l, b, w, h = bbox.bounds
1387+
l -= pad/2.
1388+
b -= pad/2.
1389+
w += pad
1390+
h += pad
1391+
r = Rectangle(xy=(l, b),
13921392
width=w,
13931393
height=h,
13941394
fill=fill,
@@ -1407,8 +1407,8 @@ def draw_bbox(bbox, renderer, color='k', trans=None):
14071407
to test whether the artist is returning the correct bbox.
14081408
"""
14091409

1410-
l,b,w,h = bbox.get_bounds()
1411-
r = Rectangle(xy=(l,b),
1410+
l, b, w, h = bbox.bounds
1411+
r = Rectangle(xy=(l, b),
14121412
width=w,
14131413
height=h,
14141414
edgecolor=color,
@@ -3174,7 +3174,7 @@ def transmute(self, path, mutation_size, linewidth):
31743174
cos_t, sin_t = get_cos_sin(x1, y1, x0, y0)
31753175
verticesA, codesA = self._get_bracket(x0, y0, cos_t, sin_t,
31763176
self.widthA*scaleA,
3177-
self.legnthA*scaleA)
3177+
self.lengthA*scaleA)
31783178
vertices_list.append(verticesA)
31793179
codes_list.append(codesA)
31803180

0 commit comments

Comments
 (0)