@@ -63,42 +63,34 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
6363 offsets , offsetTrans , facecolors , edgecolors ,
6464 linewidths , linestyles , antialiaseds , urls ,
6565 offset_position ):
66- cliprect = gc .get_clip_rectangle ()
67- clippath , clippath_transform = gc .get_clip_path ()
68- if all_transforms :
69- transforms = [numpy .dot (master_transform , t ) for t in all_transforms ]
66+ if offset_position == 'data' :
67+ offset_position = True
7068 else :
71- transforms = [master_transform ]
72- gc .draw_path_collection (cliprect ,
73- clippath ,
74- clippath_transform ,
75- paths ,
76- transforms ,
77- offsets ,
78- offsetTrans ,
79- facecolors ,
80- edgecolors ,
81- linewidths ,
82- linestyles ,
83- antialiaseds )
69+ offset_position = False
70+ path_ids = []
71+ for path , transform in self ._iter_collection_raw_paths (
72+ master_transform , paths , all_transforms ):
73+ path_ids .append ((path , transform ))
74+ master_transform = master_transform .get_matrix ()
75+ all_transforms = [t .get_matrix () for t in all_transforms ]
76+ offsetTrans = offsetTrans .get_matrix ()
77+ gc .draw_path_collection (master_transform , path_ids , all_transforms ,
78+ offsets , offsetTrans , facecolors , edgecolors ,
79+ linewidths , linestyles , antialiaseds ,
80+ offset_position )
8481
8582 def draw_quad_mesh (self , gc , master_transform , meshWidth , meshHeight ,
8683 coordinates , offsets , offsetTrans , facecolors ,
87- antialiased , showedges ):
88- cliprect = gc .get_clip_rectangle ()
89- clippath , clippath_transform = gc .get_clip_path ()
90- gc .draw_quad_mesh (master_transform ,
91- cliprect ,
92- clippath ,
93- clippath_transform ,
84+ antialiased , edgecolors ):
85+ gc .draw_quad_mesh (master_transform .get_matrix (),
9486 meshWidth ,
9587 meshHeight ,
9688 coordinates ,
9789 offsets ,
98- offsetTrans ,
90+ offsetTrans . get_matrix () ,
9991 facecolors ,
10092 antialiased ,
101- showedges )
93+ edgecolors )
10294
10395 def new_gc (self ):
10496 self .gc .save ()
0 commit comments