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