8000 allow fillstyle 'none' option by cragm · Pull Request #447 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

allow fillstyle 'none' option #447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 31, 2011
Prev Previous commit
Next Next commit
Fix missing 'self.'s in call of _half_fill method.
  • Loading branch information
cragm committed Dec 10, 2011
commit c6e93d3ed5f35a97a94ca3c522173290bdbfbc30
20 changes: 10 additions & 10 deletions lib/matplotlib/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,14 @@ def _set_mathtext_path(self):

def _half_fill(self):
fs = self.get_fillstyle()
result = fs in _half_fillstyles
result = fs in self._half_fillstyles
return result

def _set_circle(self, reduction = 1.0):
self._transform = Affine2D().scale(0.5 * reduction)
self._snap_threshold = 3.0
fs = self.get_fillstyle()
if not _half_fill():
if not self._half_fill():
self._path = Path.unit_circle()
else:
# build a right-half circle
Expand Down Expand Up @@ -296,7 +296,7 @@ def _set_triangle(self, rot, skip):
self._snap_threshold = 5.0
fs = self.get_fillstyle()

if not _half_fill():
if not self._half_fill():
self._path = self._triangle_path
else:
mpaths = [self._triangle_path_u,
Expand Down Expand Up @@ -335,7 +335,7 @@ def _set_square(self):
self._transform = Affine2D().translate(-0.5, -0.5)
self._snap_threshold = 2.0
fs = self.get_fillstyle()
if not _half_fill():
if not self._half_fill():
self._path = Path.unit_rectangle()
else:
# build a bottom filled square out of two rectangles, one
Expand All @@ -355,7 +355,7 @@ def _set_diamond(self):
self._transform = Affine2D().translate(-0.5, -0.5).rotate_deg(45)
self._snap_threshold = 5.0
fs = self.get_fillstyle()
if not _half_fill():
if not self._half_fill():
self._path = Path.unit_rectangle()
else:
self._path = Path([[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 0.0]])
Expand All @@ -380,7 +380,7 @@ def _set_pentagon(self):
polypath = Path.unit_regular_polygon(5)
fs = self.get_fillstyle()

if not _half_fill():
if not self._half_fill():
self._path = polypath
else:
verts = polypath.vertices
Expand Down Expand Up @@ -410,7 +410,7 @@ def _set_star(self):
fs = self.get_fillstyle()
polypath = Path.unit_regular_star(5, innerCircle=0.381966)

if not _half_fill():
if not self._half_fill():
self._path = polypath
else:
verts = polypath.vertices
Expand Down Expand Up @@ -439,7 +439,7 @@ def _set_hexagon1(self):
fs = self.get_fillstyle()
polypath = Path.unit_regular_polygon(6)

if not _half_fill():
if not self._half_fill():
self._path = polypath
else:
verts = polypath.vertices
Expand Down Expand Up @@ -471,7 +471,7 @@ def _set_hexagon2(self):
fs = self.get_fillstyle()
polypath = Path.unit_regular_polygon(6)

if not _half_fill():
if not self._half_fill():
self._path = polypath
else:
verts = polypath.vertices
Expand Down Expand Up @@ -503,7 +503,7 @@ def _set_octagon(self):
fs = self.get_fillstyle()
polypath = Path.unit_regular_polygon(8)

if not _half_fill():
if not self._half_fill():
self._transform.rotate_deg(22.5)
self._path = polypath
else:
Expand Down
0