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

Skip to content

Commit fb5cf7d

Browse files
committed
Fix non-linear scaling with pcolormesh and non-Agg backends.
svn path=/trunk/matplotlib/; revision=5777
1 parent 5e94e9e commit fb5cf7d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/matplotlib/collections.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"""
1111
import math, warnings
1212
import numpy as np
13+
import numpy.ma as ma
1314
import matplotlib as mpl
1415
import matplotlib.cbook as cbook
1516
import matplotlib.colors as _colors # avoid conflict with kwarg
@@ -468,7 +469,11 @@ def convert_mesh_to_paths(meshWidth, meshHeight, coordinates):
468469
"""
469470
Path = mpath.Path
470471

471-
c = coordinates
472+
if ma.isMaskedArray(coordinates):
473+
c = coordinates.data
474+
else:
475+
c = coordinates
476+
472477
# We could let the Path constructor generate the codes for us,
473478
# but this is faster, since we know they'll always be the same
474479
codes = np.array(

0 commit comments

Comments
 (0)