@@ -435,10 +435,9 @@ def _axmask(self):
435
435
436
436
def _draw_ticks (self , renderer , edgep1 , centers , deltas , highs ,
437
437
deltas_per_point , pos ):
438
- ticks = self ._update_ticks ()
438
+ ticks = self ._get_ticks_to_draw ( update = False ) # We updated in Axes3D.draw ()
439
439
info = self ._axinfo
440
440
index = info ["i" ]
441
- juggled = info ["juggled" ]
442
441
443
442
mins , maxs , tc , highs = self ._get_coord_info ()
444
443
centers , deltas = self ._calc_centers_deltas (maxs , mins )
@@ -461,17 +460,28 @@ def _draw_ticks(self, renderer, edgep1, centers, deltas, highs,
461
460
# Get tick line positions
462
461
pos = edgep1 .copy ()
463
462
pos [index ] = tick .get_loc ()
464
- pos [tickdir ] = out_tickdir
465
- x1 , y1 , z1 = proj3d .proj_transform (* pos , self .axes .M )
466
- pos [tickdir ] = in_tickdir
467
- x2 , y2 , z2 = proj3d .proj_transform (* pos , self .axes .M )
468
-
469
- # Get position of label
470
- labeldeltas = (tick .get_pad () + default_label_offset ) * points
471
463
472
- pos [tickdir ] = edgep1_tickdir
473
- pos = _move_from_center (pos , centers , labeldeltas , self ._axmask ())
474
- lx , ly , lz = proj3d .proj_transform (* pos , self .axes .M )
464
+ # Add out and in tickdir positions
465
+ positions = []
466
+ for td in (out_tickdir , in_tickdir ):
467
+ p = pos .copy ()
468
+ p [tickdir ] = td
469
+ positions .append (p )
470
+
471
+ # Add label position
472
+ p = pos .copy ()
473
+ p [tickdir ] = edgep1_tickdir
474
+ positions .append (_move_from_center (
475
+ p , centers ,
476
+ (tick .get_pad () + default_label_offset ) * points ,
477
+ self ._axmask ()
478
+ ))
479
+
480
+ xs , ys , zs = proj3d ._proj_trans_points (np .array (positions ), self .axes .M )
481
+
482
+ x1 , y1 , z1 = xs [0 ], ys [0 ], zs [0 ]
483
+ x2 , y2 , z2 = xs [1 ], ys [1 ], zs [1 ]
484
+ lx , ly , lz = xs [2 ], ys [2 ], zs [2 ]
475
485
476
486
_tick_update_position (tick , (x1 , x2 ), (y1 , y2 ), (lx , ly ))
477
487
tick .tick1line .set_linewidth (tick_lw [tick ._major ])
@@ -636,7 +646,7 @@ def draw_grid(self, renderer):
636
646
637
647
renderer .open_group ("grid3d" , gid = self .get_gid ())
638
648
639
- ticks = self ._update_ticks ()
649
+ ticks = self ._get_ticks_to_draw ( update = False ) # We updated in Axes3D.draw ()
640
650
if len (ticks ):
641
651
# Get general axis information:
642
652
info = self ._axinfo
0 commit comments