@@ -1143,21 +1143,26 @@ def xticks(*args, **kwargs):
11431143
11441144 # set the locations and labels of the xticks
11451145 xticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )
1146-
1146+
1147+ The keyword args, if any, are text properties; see text for more
1148+ information on text properties.
11471149 """
11481150 ax = gca ()
11491151
11501152 if len (args )== 0 :
11511153 locs = ax .get_xticks ()
11521154 labels = ax .get_xticklabels ()
1153-
11541155 elif len (args )== 1 :
11551156 locs = ax .set_xticks (args [0 ])
11561157 labels = ax .get_xticklabels ()
11571158 elif len (args )== 2 :
11581159 locs = ax .set_xticks (args [0 ])
1159- labels = ax .set_xticklabels (args [1 ])
1160+ labels = ax .set_xticklabels (args [1 ], ** kwargs )
11601161 else : raise RuntimeError ('Illegal number of arguments to xticks' )
1162+ if len (kwargs ):
1163+ for l in labels :
1164+ l .update_properties (kwargs )
1165+
11611166 draw_if_interactive ()
11621167 return locs , labels
11631168
@@ -1174,7 +1179,9 @@ def yticks(*args, **kwargs):
11741179
11751180 # set the locations and labels of the yticks
11761181 yticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )
1177-
1182+
1183+ The keyword args, if any, are text properties; see text for more
1184+ information on text properties.
11781185 """
11791186 ax = gca ()
11801187
@@ -1186,9 +1193,14 @@ def yticks(*args, **kwargs):
11861193 labels = ax .get_yticklabels ()
11871194 elif len (args )== 2 :
11881195 locs = ax .set_yticks (args [0 ])
1189- labels = ax .set_yticklabels (args [1 ])
1196+ labels = ax .set_yticklabels (args [1 ], ** kwargs )
11901197 else : raise RuntimeError ('Illegal number of arguments to yticks' )
1198+ if len (kwargs ):
1199+ for l in labels :
1200+ l .update_properties (kwargs )
1201+
11911202 draw_if_interactive ()
1203+
11921204 return locs , labels
11931205
11941206
0 commit comments