Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f10c2ab

Browse filesBrowse files
committed
pcolormesh range bug fix
1 parent 53fd0d3 commit f10c2ab
Copy full SHA for f10c2ab

File tree

Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed
Open diff view settings
Collapse file

‎lib/matplotlib/axes.py‎

Copy file name to clipboardExpand all lines: lib/matplotlib/axes.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7490,6 +7490,19 @@ def pcolormesh(self, *args, **kwargs):
74907490
collection.autoscale_None()
74917491

74927492
self.grid(False)
7493+
7494+
# Transform from native to data coordinates?
7495+
t = collection._transform
7496+
if (not isinstance(t, mtransforms.Transform)
7497+
and hasattr(t, '_as_mpl_transform')):
7498+
t = t._as_mpl_transform(self.axes)
7499+
7500+
if t and any(t.contains_branch_seperately(self.transData)):
7501+
trans_to_data = t - self.transData
7502+
pts = np.vstack([X, Y]).T.astype(np.float)
7503+
transformed_pts = trans_to_data.transform(pts)
7504+
X = transformed_pts[..., 0]
7505+
Y = transformed_pts[..., 1]
74937506

74947507
minx = np.amin(X)
74957508
maxx = np.amax(X)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.