@@ -104,7 +104,7 @@ def set_3d_properties(self, z=0, zdir='z'):
104
104
@artist .allow_rasterization
105
105
def draw (self , renderer ):
106
106
proj = proj3d .proj_trans_points (
107
- [self ._position3d , self ._position3d + self ._dir_vec ], renderer .M )
107
+ [self ._position3d , self ._position3d + self ._dir_vec ], self . axes .M )
108
108
dx = proj [0 ][1 ] - proj [0 ][0 ]
109
109
dy = proj [1 ][1 ] - proj [1 ][0 ]
110
110
angle = math .degrees (math .atan2 (dy , dx ))
@@ -181,7 +181,7 @@ def get_data_3d(self):
181
181
@artist .allow_rasterization
182
182
def draw (self , renderer ):
183
183
xs3d , ys3d , zs3d = self ._verts3d
184
- xs , ys , zs = proj3d .proj_transform (xs3d , ys3d , zs3d , renderer .M )
184
+ xs , ys , zs = proj3d .proj_transform (xs3d , ys3d , zs3d , self . axes .M )
185
185
self .set_data (xs , ys )
186
186
super ().draw (renderer )
187
187
self .stale = False
@@ -269,9 +269,8 @@ def do_3d_projection(self, renderer):
269
269
"""
270
270
Project the points according to renderer matrix.
271
271
"""
272
- xyslist = [
273
- proj3d .proj_trans_points (points , renderer .M ) for points in
274
- self ._segments3d ]
272
+ xyslist = [proj3d .proj_trans_points (points , self .axes .M )
273
+ for points in self ._segments3d ]
275
274
segments_2d = [np .column_stack ([xs , ys ]) for xs , ys , zs in xyslist ]
276
275
LineCollection .set_segments (self , segments_2d )
277
276
@@ -319,7 +318,8 @@ def get_facecolor(self):
319
318
def do_3d_projection (self , renderer ):
320
319
s = self ._segment3d
321
320
xs , ys , zs = zip (* s )
322
- vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs , renderer .M )
321
+ vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs ,
322
+ self .axes .M )
323
323
self ._path2d = mpath .Path (np .column_stack ([vxs , vys ]))
324
324
# FIXME: coloring
325
325
self ._facecolor2d = self ._facecolor3d
@@ -343,7 +343,8 @@ def set_3d_properties(self, path, zs=0, zdir='z'):
343
343
def do_3d_projection (self , renderer ):
344
344
s = self ._segment3d
345
345
xs , ys , zs = zip (* s )
346
- vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs , renderer .M )
346
+ vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs ,
347
+ self .axes .M )
347
348
self ._path2d = mpath .Path (np .column_stack ([vxs , vys ]), self ._code3d )
348
349
# FIXME: coloring
349
350
self ._facecolor2d = self ._facecolor3d
@@ -425,7 +426,8 @@ def set_3d_properties(self, zs, zdir):
425
426
426
427
def do_3d_projection (self , renderer ):
427
428
xs , ys , zs = self ._offsets3d
428
- vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs , renderer .M )
429
+ vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs ,
430
+ self .axes .M )
429
431
430
432
fcs = (_zalpha (self ._facecolor3d , vzs ) if self ._depthshade else
431
433
self ._facecolor3d )
@@ -492,7 +494,8 @@ def set_3d_properties(self, zs, zdir):
492
494
493
495
def do_3d_projection (self , renderer ):
494
496
xs , ys , zs = self ._offsets3d
495
- vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs , renderer .M )
497
+ vxs , vys , vzs , vis = proj3d .proj_transform_clip (xs , ys , zs ,
498
+ self .axes .M )
496
499
497
500
fcs = (_zalpha (self ._facecolor3d , vzs ) if self ._depthshade else
498
501
self ._facecolor3d )
@@ -673,7 +676,7 @@ def do_3d_projection(self, renderer):
673
676
self .update_scalarmappable ()
674
677
self ._facecolors3d = self ._facecolors
675
678
676
- txs , tys , tzs = proj3d ._proj_transform_vec (self ._vec , renderer .M )
679
+ txs , tys , tzs = proj3d ._proj_transform_vec (self ._vec , self . axes .M )
677
680
xyzlist = [(txs [sl ], tys [sl ], tzs [sl ]) for sl in self ._segslices ]
678
681
679
682
# This extra fuss is to re-order face / edge colors
@@ -709,7 +712,7 @@ def do_3d_projection(self, renderer):
709
712
# Return zorder value
710
713
if self ._sort_zpos is not None :
711
714
zvec = np .array ([[0 ], [0 ], [self ._sort_zpos ], [1 ]])
712
- ztrans = proj3d ._proj_transform_vec (zvec , renderer .M )
715
+ ztrans = proj3d ._proj_transform_vec (zvec , self . axes .M )
713
716
return ztrans [2 ][0 ]
714
717
elif tzs .size > 0 :
715
718
# FIXME: Some results still don't look quite right.
0 commit comments