@@ -75,6 +75,7 @@ def __init__(
7575 label2On = False ,
7676 major = True ,
7777 labelrotation = 0 ,
78+ labelrotation_mode = None ,
7879 grid_color = None ,
7980 grid_linestyle = None ,
8081 grid_linewidth = None ,
@@ -157,11 +158,13 @@ def __init__(
157158 self .label1 = mtext .Text (
158159 np .nan , np .nan ,
159160 fontsize = labelsize , color = labelcolor , visible = label1On ,
160- fontfamily = labelfontfamily , rotation = self ._labelrotation [1 ])
161+ fontfamily = labelfontfamily , rotation = self ._labelrotation [1 ],
162+ rotation_mode = labelrotation_mode )
161163 self .label2 = mtext .Text (
162164 np .nan , np .nan ,
163165 fontsize = labelsize , color = labelcolor , visible = label2On ,
164- fontfamily = labelfontfamily , rotation = self ._labelrotation [1 ])
166+ fontfamily = labelfontfamily , rotation = self ._labelrotation [1 ],
167+ rotation_mode = labelrotation_mode )
165168
166169 self ._apply_tickdir (tickdir )
167170
@@ -321,7 +324,8 @@ def _apply_params(self, **kwargs):
321324 self .label2 .set (rotation = self ._labelrotation [1 ])
322325
323326 label_kw = {k [5 :]: v for k , v in kwargs .items ()
324- if k in ['labelsize' , 'labelcolor' , 'labelfontfamily' ]}
327+ if k in ['labelsize' , 'labelcolor' , 'labelfontfamily' ,
328+ 'labelrotation_mode' ]}
325329 self .label1 .set (** label_kw )
326330 self .label2 .set (** label_kw )
327331
@@ -1050,14 +1054,15 @@ def _translate_tick_params(cls, kw, reverse=False):
10501054 'tick1On' , 'tick2On' , 'label1On' , 'label2On' ,
10511055 'length' , 'direction' , 'left' , 'bottom' , 'right' , 'top' ,
10521056 'labelleft' , 'labelbottom' , 'labelright' , 'labeltop' ,
1053- 'labelrotation' , 'rotation_mode ' ,
1057+ 'labelrotation' , 'labelrotation_mode ' ,
10541058 * _gridline_param_names ]
10551059
10561060 keymap = {
10571061 # tick_params key -> axis key
10581062 'length' : 'size' ,
10591063 'direction' : 'tickdir' ,
10601064 'rotation' : 'labelrotation' ,
1065+ 'rotation_mode' : 'labelrotation_mode' ,
10611066 'left' : 'tick1On' ,
10621067 'bottom' : 'tick1On' ,
10631068 'right' : 'tick2On' ,
0 commit comments