@@ -73,6 +73,7 @@ def __init__(self, axes, loc, label,
73
73
pad = None ,
74
74
labelsize = None ,
75
75
labelcolor = None ,
76
+ labelrotation = 0 ,
76
77
zorder = None ,
77
78
gridOn = None , # defaults to axes.grid depending on
78
79
# axes.grid.which
@@ -139,6 +140,8 @@ def __init__(self, axes, loc, label,
139
140
labelsize = rcParams ['%s.labelsize' % name ]
140
141
self ._labelsize = labelsize
141
142
143
+ self ._labelrotation = labelrotation
144
+
142
145
if zorder is None :
143
146
if major :
144
147
zorder = mlines .Line2D .zorder + 0.01
@@ -333,7 +336,7 @@ def _apply_params(self, **kw):
333
336
self .tick1line .set_markeredgewidth (v )
334
337
self .tick2line .set_markeredgewidth (v )
335
338
label_list = [k for k in six .iteritems (kw )
336
- if k [0 ] in ['labelsize' , 'labelcolor' ]]
339
+ if k [0 ] in ['labelsize' , 'labelcolor' , 'labelrotation' ]]
337
340
if label_list :
338
341
label_kw = dict ([(k [5 :], v ) for (k , v ) in label_list ])
339
342
self .label1 .set (** label_kw )
@@ -798,14 +801,17 @@ def _translate_tick_kw(kw, to_init_kw=True):
798
801
'labelsize' , 'labelcolor' , 'zorder' , 'gridOn' ,
799
802
'tick1On' , 'tick2On' , 'label1On' , 'label2On' ]
800
803
kwkeys1 = ['length' , 'direction' , 'left' , 'bottom' , 'right' , 'top' ,
801
- 'labelleft' , 'labelbottom' , 'labelright' , 'labeltop' ]
804
+ 'labelleft' , 'labelbottom' , 'labelright' , 'labeltop' ,
805
+ 'rotation' ]
802
806
kwkeys = kwkeys0 + kwkeys1
803
807
kwtrans = dict ()
804
808
if to_init_kw :
805
809
if 'length' in kw :
806
810
kwtrans ['size' ] = kw .pop ('length' )
807
811
if 'direction' in kw :
808
812
kwtrans ['tickdir' ] = kw .pop ('direction' )
813
+ if 'rotation' in kw :
814
+ kwtrans ['labelrotation' ] = kw .pop ('rotation' )
809
815
if 'left' in kw :
810
816
kwtrans ['tick1On' ] = _string_to_bool (kw .pop ('left' ))
811
817
if 'bottom' in kw :
0 commit comments