@@ -1177,40 +1177,58 @@ def _set_title_offset_trans(self, title_offset_points):
1177
1177
1178
1178
def set_prop_cycle (self , * args , ** kwargs ):
1179
1179
"""
1180
- Set the property cycle for any future plot commands on this Axes.
1180
+ Set the property cycle of the Axes.
1181
1181
1182
- set_prop_cycle(arg)
1183
- set_prop_cycle(label, itr)
1184
- set_prop_cycle(label1=itr1[, label2=itr2[, ...]])
1182
+ The property cycle controls the style properties such as color,
1183
+ marker and linestyle of future plot commands. The style properties
1184
+ of data already added to the Axes are not modified.
1185
+
1186
+ Call signatures::
1187
+
1188
+ set_prop_cycle(cycler)
1189
+ set_prop_cycle(label, values)
1190
+ set_prop_cycle(label=values[, label2=values2[, ...]])
1185
1191
1186
1192
Form 1 simply sets given `Cycler` object.
1187
1193
1188
- Form 2 creates and sets a `Cycler` from a label and an iterable.
1194
+ Form 2 creates and sets a `Cycler` from a label and an iterable.
1189
1195
1190
- Form 3 composes and sets a `Cycler` as an inner product of the
1196
+ Form 3 composes and sets a `Cycler` as an inner product of the
1191
1197
pairs of keyword arguments. In other words, all of the
1192
1198
iterables are cycled simultaneously, as if through zip().
1193
1199
1194
1200
Parameters
1195
1201
----------
1196
- arg : Cycler
1197
- Set the given Cycler.
1198
- Can also be `None` to reset to the cycle defined by the
1202
+ cycler : Cycler
1203
+ Set the given Cycler. *None* resets to the cycle defined by the
1199
1204
current style.
1200
1205
1201
1206
label : str
1202
- The property key. Must be a valid `Artist` property.
1207
+ The property key. Must be a valid `. Artist` property.
1203
1208
For example, 'color' or 'linestyle'. Aliases are allowed,
1204
1209
such as 'c' for 'color' and 'lw' for 'linewidth'.
1205
1210
1206
- itr : iterable
1211
+ values : iterable
1207
1212
Finite-length iterable of the property values. These values
1208
1213
are validated and will raise a ValueError if invalid.
1209
1214
1215
+ Examples
1216
+ --------
1217
+ Setting the property cycle for a single property:
1218
+
1219
+ >>> ax.set_prop_cycle(color=['red', 'green', 'blue']) # or
1220
+ >>> ax.set_prop_cycle('color', ['red', 'green', 'blue'])
1221
+
1222
+ Setting the property cycle for simultaneously cycling over multiple
1223
+ properties (e.g. red circle, green plus, blue cross):
1224
+
1225
+ >>> ax.set_prop_cycle(color=['red', 'green', 'blue'],
1226
+ ... marker=['o', '+', 'x'])
1227
+
1210
1228
See Also
1211
1229
--------
1212
- :func:` cycler` Convenience function for creating your
1213
- own cyclers.
1230
+ matplotlib.rcsetup. cycler
1231
+ Convenience function for creating your own cyclers.
1214
1232
1215
1233
"""
1216
1234
if args and kwargs :
0 commit comments