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