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

Skip to content

Commit e16a44e

Browse files
committed
Fixed bugs in pcolorfast and in quadmesh rendering with svg, pdf
svn path=/trunk/matplotlib/; revision=4958
1 parent 7230987 commit e16a44e

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5035,7 +5035,8 @@ def pcolorfast(self, *args, **kwargs):
50355035
if (npy.ptp(dx) < 0.01*npy.abs(dx.mean()) and
50365036
npy.ptp(dy) < 0.01*npy.abs(dy.mean())):
50375037
style = "image"
5038-
style = "pcolorimage"
5038+
else:
5039+
style = "pcolorimage"
50395040
elif x.ndim == 2 and y.ndim == 2:
50405041
style = "quadmesh"
50415042
else:

lib/matplotlib/backends/backend_mixed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def stop_rasterizing(self):
8989
if w > 0 and h > 0:
9090
image = frombuffer(buffer, w, h, True)
9191
image.is_grayscale = False
92-
92+
image.flipud_out()
9393
self._renderer.draw_image(l, height - b - h, image, None)
9494
self._raster_renderer = None
9595
self._rasterizing = False

lib/matplotlib/image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,8 @@ def make_image(self, magnification=1.0):
451451
A = self._rgbacache
452452
vl = self.axes.viewLim
453453
im = _image.pcolor2(self._Ax, self._Ay, A,
454-
self.axes.bbox.height,
455-
self.axes.bbox.width,
454+
height,
455+
width,
456456
(vl.x0, vl.x1, vl.y0, vl.y1),
457457
bg)
458458
im.is_grayscale = self.is_grayscale

0 commit comments

Comments
 (0)