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

Skip to content

Commit aaa6f4c

Browse files
committed
Merged revisions 8824 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v1_0_maint ........ r8824 | mdboom | 2010-12-10 09:16:11 -0500 (Fri, 10 Dec 2010) | 2 lines Fix polygon closing on triangle markers (Bug #3102034) ........ svn path=/trunk/matplotlib/; revision=8825
1 parent 6416d2f commit aaa6f4c

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

lib/matplotlib/lines.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -800,11 +800,11 @@ def set_marker(self, marker):
800800
801801
802802
803-
ACCEPTS: [ ``'+'`` | ``'*'`` | ``','`` | ``'.'``
803+
ACCEPTS: [ ``'+'`` | ``'*'`` | ``','`` | ``'.'``
804804
| ``'1'`` | ``'2'`` | ``'3'`` | ``'4'``
805-
| ``'<'`` | ``'>'`` | ``'D'`` | ``'H'``
806-
| ``'^'`` | ``'_'`` | ``'d'`` | ``'h'``
807-
| ``'o'`` | ``'p'`` | ``'s'`` | ``'v'``
805+
| ``'<'`` | ``'>'`` | ``'D'`` | ``'H'``
806+
| ``'^'`` | ``'_'`` | ``'d'`` | ``'h'``
807+
| ``'o'`` | ``'p'`` | ``'s'`` | ``'v'``
808808
| ``'x'`` | ``'|'``
809809
| TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT
810810
| CARETUP | CARETDOWN | CARETLEFT | CARETRIGHT
@@ -1072,12 +1072,17 @@ def _draw_circle(self, renderer, gc, path, path_trans):
10721072
path, path_trans, rgbFace_alt)
10731073

10741074

1075-
_triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]])
1075+
_triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]],
1076+
[Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY])
10761077
# Going down halfway looks to small. Golden ratio is too far.
1077-
_triangle_path_u = Path([[0.0, 1.0], [-3/5., -1/5.], [3/5., -1/5.], [0.0, 1.0]])
1078-
_triangle_path_d = Path([[-3/5., -1/5.], [3/5., -1/5.], [1.0, -1.0], [-1.0, -1.0], [-3/5., -1/5.]])
1079-
_triangle_path_l = Path([[0.0, 1.0], [0.0, -1.0], [-1.0, -1.0], [0.0, 1.0]])
1080-
_triangle_path_r = Path([[0.0, 1.0], [0.0, -1.0], [1.0, -1.0], [0.0, 1.0]])
1078+
_triangle_path_u = Path([[0.0, 1.0], [-3/5., -1/5.], [3/5., -1/5.], [0.0, 1.0]],
1079+
[Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY])
1080+
_triangle_path_d = Path([[-3/5., -1/5.], [3/5., -1/5.], [1.0, -1.0], [-1.0, -1.0], [-3/5., -1/5.]],
1081+
[Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY])
1082+
_triangle_path_l = Path([[0.0, 1.0], [0.0, -1.0], [-1.0, -1.0], [0.0, 1.0]],
1083+
[Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY])
1084+
_triangle_path_r = Path([[0.0, 1.0], [0.0, -1.0], [1.0, -1.0], [0.0, 1.0]],
1085+
[Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY])
10811086
def _draw_triangle(self, renderer, gc, path, path_trans, direction):
10821087
gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
10831088
offset = 0.5*renderer.points_to_pixels(self._markersize)

0 commit comments

Comments
 (0)