Revision: 8824 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8824&view=rev Author: mdboom Date: 2010-12-10 14:16:11 +0000 (Fri, 10 Dec 2010)
Log Message: ----------- Fix polygon closing on triangle markers (Bug #3102034) Modified Paths: -------------- branches/v1_0_maint/lib/matplotlib/lines.py Modified: branches/v1_0_maint/lib/matplotlib/lines.py =================================================================== --- branches/v1_0_maint/lib/matplotlib/lines.py 2010-12-10 14:04:30 UTC (rev 8823) +++ branches/v1_0_maint/lib/matplotlib/lines.py 2010-12-10 14:16:11 UTC (rev 8824) @@ -797,11 +797,11 @@ - ACCEPTS: [ ``'+'`` | ``'*'`` | ``','`` | ``'.'`` + ACCEPTS: [ ``'+'`` | ``'*'`` | ``','`` | ``'.'`` | ``'1'`` | ``'2'`` | ``'3'`` | ``'4'`` - | ``'<'`` | ``'>'`` | ``'D'`` | ``'H'`` - | ``'^'`` | ``'_'`` | ``'d'`` | ``'h'`` - | ``'o'`` | ``'p'`` | ``'s'`` | ``'v'`` + | ``'<'`` | ``'>'`` | ``'D'`` | ``'H'`` + | ``'^'`` | ``'_'`` | ``'d'`` | ``'h'`` + | ``'o'`` | ``'p'`` | ``'s'`` | ``'v'`` | ``'x'`` | ``'|'`` | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | CARETUP | CARETDOWN | CARETLEFT | CARETRIGHT @@ -1069,12 +1069,17 @@ path, path_trans, rgbFace_alt) - _triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]]) + _triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]], + [Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY]) # Going down halfway looks to small. Golden ratio is too far. - _triangle_path_u = Path([[0.0, 1.0], [-3/5., -1/5.], [3/5., -1/5.], [0.0, 1.0]]) - _triangle_path_d = Path([[-3/5., -1/5.], [3/5., -1/5.], [1.0, -1.0], [-1.0, -1.0], [-3/5., -1/5.]]) - _triangle_path_l = Path([[0.0, 1.0], [0.0, -1.0], [-1.0, -1.0], [0.0, 1.0]]) - _triangle_path_r = Path([[0.0, 1.0], [0.0, -1.0], [1.0, -1.0], [0.0, 1.0]]) + _triangle_path_u = Path([[0.0, 1.0], [-3/5., -1/5.], [3/5., -1/5.], [0.0, 1.0]], + [Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY]) + _triangle_path_d = Path([[-3/5., -1/5.], [3/5., -1/5.], [1.0, -1.0], [-1.0, -1.0], [-3/5., -1/5.]], + [Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY]) + _triangle_path_l = Path([[0.0, 1.0], [0.0, -1.0], [-1.0, -1.0], [0.0, 1.0]], + [Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY]) + _triangle_path_r = Path([[0.0, 1.0], [0.0, -1.0], [1.0, -1.0], [0.0, 1.0]], + [Path.MOVETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY]) def _draw_triangle(self, renderer, gc, path, path_trans, direction): gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) offset = 0.5*renderer.points_to_pixels(self._markersize) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins