@@ -410,23 +410,15 @@ def _set_pixel(self):
410410 def _set_point (self ):
411411 self ._set_circle (reduction = self ._point_size_reduction )
412412
413- _triangle_path = Path (
414- [[0.0 , 1.0 ], [- 1.0 , - 1.0 ], [1.0 , - 1.0 ], [0.0 , 1.0 ]],
415- [Path .MOVETO , Path .LINETO , Path .LINETO , Path .CLOSEPOLY ])
413+ _triangle_path = Path ([[0 , 1 ], [- 1 , - 1 ], [1 , - 1 ], [0 , 1 ]], closed = True )
416414 # Going down halfway looks to small. Golden ratio is too far.
417- _triangle_path_u = Path (
418- [[0.0 , 1.0 ], [- 3 / 5. , - 1 / 5. ], [3 / 5. , - 1 / 5. ], [0.0 , 1.0 ]],
419- [Path .MOVETO , Path .LINETO , Path .LINETO , Path .CLOSEPOLY ])
415+ _triangle_path_u = Path ([[0 , 1 ], [- 3 / 5 , - 1 / 5 ], [3 / 5 , - 1 / 5 ], [0 , 1 ]],
416+ closed = True )
420417 _triangle_path_d = Path (
421- [[- 3 / 5. , - 1 / 5. ], [3 / 5. , - 1 / 5. ], [1.0 , - 1.0 ], [- 1.0 , - 1.0 ],
422- [- 3 / 5. , - 1 / 5. ]],
423- [Path .MOVETO , Path .LINETO , Path .LINETO , Path .LINETO , Path .CLOSEPOLY ])
424- _triangle_path_l = Path (
425- [[0.0 , 1.0 ], [0.0 , - 1.0 ], [- 1.0 , - 1.0 ], [0.0 , 1.0 ]],
426- [Path .MOVETO , Path .LINETO , Path .LINETO , Path .CLOSEPOLY ])
427- _triangle_path_r = Path (
428- [[0.0 , 1.0 ], [0.0 , - 1.0 ], [1.0 , - 1.0 ], [0.0 , 1.0 ]],
429- [Path .MOVETO , Path .LINETO , Path .LINETO , Path .CLOSEPOLY ])
418+ [[- 3 / 5 , - 1 / 5 ], [3 / 5 , - 1 / 5 ], [1 , - 1 ], [- 1 , - 1 ], [- 3 / 5 , - 1 / 5 ]],
419+ closed = True )
420+ _triangle_path_l = Path ([[0 , 1 ], [0 , - 1 ], [- 1 , - 1 ], [0 , 1 ]], closed = True )
421+ _triangle_path_r = Path ([[0 , 1 ], [0 , - 1 ], [1 , - 1 ], [0 , 1 ]], closed = True )
430422
431423 def _set_triangle (self , rot , skip ):
432424 self ._transform = Affine2D ().scale (0.5 ).rotate_deg (rot )
@@ -505,10 +497,8 @@ def _set_diamond(self):
505497 if not self ._half_fill ():
506498 self ._path = Path .unit_rectangle ()
507499 else :
508- self ._path = Path ([[0.0 , 0.0 ], [1.0 , 0.0 ], [1.0 , 1.0 ], [0.0 , 0.0 ]])
509- self ._alt_path = Path ([[0.0 , 0.0 ], [0.0 , 1.0 ],
510- [1.0 , 1.0 ], [0.0 , 0.0 ]])
511-
500+ self ._path = Path ([[0 , 0 ], [1 , 0 ], [1 , 1 ], [0 , 0 ]])
501+ self ._alt_path = Path ([[0 , 0 ], [0 , 1 ], [1 , 1 ], [0 , 0 ]])
512502 if fs == 'bottom' :
513503 rotate = 270.
514504 elif fs == 'top' :
@@ -517,10 +507,8 @@ def _set_diamond(self):
517507 rotate = 180.
518508 else :
519509 rotate = 0.
520-
521510 self ._transform .rotate_deg (rotate )
522511 self ._alt_transform = self ._transform
523-
524512 self ._joinstyle = 'miter'
525513
526514 def _set_thin_diamond (self ):
@@ -815,24 +803,13 @@ def _set_x(self):
815803 self ._filled = False
816804 self ._path = self ._x_path
817805
818- _plus_filled_path = Path ([(1 / 3 , 0 ), (2 / 3 , 0 ), (2 / 3 , 1 / 3 ),
819- (1 , 1 / 3 ), (1 , 2 / 3 ), (2 / 3 , 2 / 3 ),
820- (2 / 3 , 1 ), (1 / 3 , 1 ), (1 / 3 , 2 / 3 ),
821- (0 , 2 / 3 ), (0 , 1 / 3 ), (1 / 3 , 1 / 3 ),
822- (1 / 3 , 0 )],
823- [Path .MOVETO , Path .LINETO , Path .LINETO ,
824- Path .LINETO , Path .LINETO , Path .LINETO ,
825- Path .LINETO , Path .LINETO , Path .LINETO ,
826- Path .LINETO , Path .LINETO , Path .LINETO ,
827- Path .CLOSEPOLY ])
828-
829- _plus_filled_path_t = Path ([(1 , 1 / 2 ), (1 , 2 / 3 ), (2 / 3 , 2 / 3 ),
830- (2 / 3 , 1 ), (1 / 3 , 1 ), (1 / 3 , 2 / 3 ),
831- (0 , 2 / 3 ), (0 , 1 / 2 ), (1 , 1 / 2 )],
832- [Path .MOVETO , Path .LINETO , Path .LINETO ,
833- Path .LINETO , Path .LINETO , Path .LINETO ,
834- Path .LINETO , Path .LINETO ,
835- Path .CLOSEPOLY ])
806+ _plus_filled_path = Path (
807+ [(1 / 3 , 0 ), (2 / 3 , 0 ), (2 / 3 , 1 / 3 ), (1 , 1 / 3 ), (1 , 2 / 3 ), (2 / 3 , 2 / 3 ),
808+ (2 / 3 , 1 ), (1 / 3 , 1 ), (1 / 3 , 2 / 3 ), (0 , 2 / 3 ), (0 , 1 / 3 ), (1 / 3 , 1 / 3 ),
809+ (1 / 3 , 0 )], closed = True )
810+ _plus_filled_path_t = Path (
811+ [(1 , 1 / 2 ), (1 , 2 / 3 ), (2 / 3 , 2 / 3 ), (2 / 3 , 1 ), (1 / 3 , 1 ), (1 / 3 , 2 / 3 ),
812+ (0 , 2 / 3 ), (0 , 1 / 2 ), (1 , 1 / 2 )], closed = True )
836813
837814 def _set_plus_filled (self ):
838815 self ._transform = Affine2D ().translate (- 0.5 , - 0.5 )
@@ -858,22 +835,13 @@ def _set_plus_filled(self):
858835 self ._transform .rotate_deg (rotate )
859836 self ._alt_transform .rotate_deg (rotate_alt )
860837
861- _x_filled_path = Path ([(0.25 , 0 ), (0.5 , 0.25 ), (0.75 , 0 ), (1 , 0.25 ),
862- (0.75 , 0.5 ), (1 , 0.75 ), (0.75 , 1 ), (0.5 , 0.75 ),
863- (0.25 , 1 ), (0 , 0.75 ), (0.25 , 0.5 ), (0 , 0.25 ),
864- (0.25 , 0 )],
865- [Path .MOVETO , Path .LINETO , Path .LINETO ,
866- Path .LINETO , Path .LINETO , Path .LINETO ,
867- Path .LINETO , Path .LINETO , Path .LINETO ,
868- Path .LINETO , Path .LINETO , Path .LINETO ,
869- Path .CLOSEPOLY ])
870-
871- _x_filled_path_t = Path ([(0.75 , 0.5 ), (1 , 0.75 ), (0.75 , 1 ),
872- (0.5 , 0.75 ), (0.25 , 1 ), (0 , 0.75 ),
873- (0.25 , 0.5 ), (0.75 , 0.5 )],
874- [Path .MOVETO , Path .LINETO , Path .LINETO ,
875- Path .LINETO , Path .LINETO , Path .LINETO ,
876- Path .LINETO , Path .CLOSEPOLY ])
838+ _x_filled_path = Path (
839+ [(0.25 , 0 ), (0.5 , 0.25 ), (0.75 , 0 ), (1 , 0.25 ), (0.75 , 0.5 ), (1 , 0.75 ),
840+ (0.75 , 1 ), (0.5 , 0.75 ), (0.25 , 1 ), (0 , 0.75 ), (0.25 , 0.5 ), (0 , 0.25 ),
841+ (0.25 , 0 )], closed = True )
842+ _x_filled_path_t = Path (
843+ [(0.75 , 0.5 ), (1 , 0.75 ), (0.75 , 1 ), (0.5 , 0.75 ), (0.25 , 1 ), (0 , 0.75 ),
844+ (0.25 , 0.5 ), (0.75 , 0.5 )], closed = True )
877845
878846 def _set_x_filled (self ):
879847 self ._transform = Affine2D ().translate (- 0.5 , - 0.5 )
0 commit comments