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

Skip to content

Commit d4f8657

Browse files
committed
Merge branch 'v1.4.x' into master branch
2 parents 36c14b5 + cad373f commit d4f8657

5 files changed

Lines changed: 18 additions & 6 deletions

File tree

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,6 @@ def __init__(self, canvas, num, window):
530530
self.set_window_title("Figure %d" % num)
531531
self.canvas = canvas
532532
self._num = num
533-
_, _, w, h = canvas.figure.bbox.bounds
534-
w, h = int(w), int(h)
535-
self.window.minsize(int(w*3/4),int(h*3/4))
536533
if matplotlib.rcParams['toolbar']=='toolbar2':
537534
self.toolbar = NavigationToolbar2TkAgg( canvas, self.window )
538535
else:

lib/matplotlib/collections.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,9 @@ def set_paths(self):
17011701
self._paths = self.convert_mesh_to_paths(
17021702
self._meshWidth, self._meshHeight, self._coordinates)
17031703

1704+
def get_datalim(self, transData):
1705+
return (self.get_transform() - transData).transform_bbox(self._bbox)
1706+
17041707
@staticmethod
17051708
def convert_mesh_to_paths(meshWidth, meshHeight, coordinates):
17061709
"""

lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ def pilread(fname):
12571257
if im is None:
12581258
raise ValueError('Only know how to handle extensions: %s; '
12591259
'with PIL installed matplotlib can handle '
1260-
'more images' % list(six.iterkeys(handlers.keys)))
1260+
'more images' % list(six.iterkeys(handlers)))
12611261
return im
12621262

12631263
handler = handlers[ext]

lib/matplotlib/transforms.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,15 @@ def transform_non_affine(self, values):
13521352
"""
13531353
return values
13541354

1355+
def transform_bbox(self, bbox):
1356+
"""
1357+
Transform the given bounding box.
1358+
1359+
Note, for smarter transforms including caching (a common
1360+
requirement for matplotlib figures), see :class:`TransformedBbox`.
1361+
"""
1362+
return Bbox(self.transform(bbox.get_points()))
1363+
13551364
def get_affine(self):
13561365
"""
13571366
Get the affine part of this transform.

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,11 @@ def mouse_init(self, rotate_btn=1, zoom_btn=3):
10081008
else:
10091009
warnings.warn('Axes3D.figure.canvas is \'None\', mouse rotation disabled. Set canvas then call Axes3D.mouse_init().')
10101010

1011-
self._rotate_btn = np.atleast_1d(rotate_btn)
1012-
self._zoom_btn = np.atleast_1d(zoom_btn)
1011+
# coerce scalars into array-like, then convert into
1012+
# a regular list to avoid comparisons against None
1013+
# which breaks in recent versions of numpy.
1014+
self._rotate_btn = np.atleast_1d(rotate_btn).tolist()
1015+
self._zoom_btn = np.atleast_1d(zoom_btn).tolist()
10131016

10141017
def can_zoom(self) :
10151018
"""

0 commit comments

Comments
 (0)