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

Skip to content

Commit 4892a25

Browse files
committed
Hopefully got to_polygons correct now.
svn path=/trunk/matplotlib/; revision=5575
1 parent 58c53bd commit 4892a25

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/matplotlib/path.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,13 @@ def to_polygons(self, transform=None, width=0, height=0):
300300

301301
if transform is not None:
302302
transform = transform.frozen()
303-
if self.codes is None:
304-
return [transform.transform(self.vertices)]
305-
else:
306-
if self.codes is None:
303+
304+
if self.codes is None and width == 0 or height == 0:
305+
if transform is None:
307306
return [self.vertices]
307+
else:
308+
return [transform.transform(self.vertices)]
309+
308310
# Deal with the case where there are curves and/or multiple
309311
# subpaths (using extension code)
310312
return convert_path_to_polygons(self, transform, width, height)

0 commit comments

Comments
 (0)