@@ -70,6 +70,11 @@ class Axis(maxis.XAxis):
7070 'color' : (0.925 , 0.925 , 0.925 , 0.5 )},
7171 }
7272
73+ # Factors for converting 2D labelpad properties to 3D
74+ # Determined by trial and error
75+ _DELTAS_PER_POINT = 0.05
76+ _DEFAULT_LABEL_OFFSET = 1.35 # In deltas
77+
7378 def __init__ (self , adir , v_intervalx , d_intervalx , axes , * args , ** kwargs ):
7479 # adir identifies which axes this is
7580 self .adir = adir
@@ -94,8 +99,6 @@ def __init__(self, adir, v_intervalx, d_intervalx, axes, *args, **kwargs):
9499
95100 maxis .XAxis .__init__ (self , axes , * args , ** kwargs )
96101
97- self .labelpad = 1.6
98-
99102 self .set_rotate_label (kwargs .get ('rotate_label' , None ))
100103
101104
@@ -266,7 +269,8 @@ def draw(self, renderer):
266269
267270 lxyz = 0.5 * (edgep1 + edgep2 )
268271
269- labeldeltas = self .labelpad * deltas
272+ labeldeltas = (self .labelpad * self ._DELTAS_PER_POINT +
273+ self ._DEFAULT_LABEL_OFFSET ) * deltas
270274 axmask = [True , True , True ]
271275 axmask [index ] = False
272276 lxyz = move_from_center (lxyz , centers , labeldeltas , axmask )
0 commit comments