Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eca75df

Browse files
authored
Merge pull request matplotlib#10668 from matplotlib/auto-backport-of-pr-10665
Backport PR matplotlib#10665 on branch v2.2.x
2 parents 31b02cb + ececb39 commit eca75df

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

doc/_static/mpl.css

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,24 @@ div.warning {
373373
border: 1px solid #eed3d7;
374374
}
375375

376+
div.deprecated {
377+
color: #606060;
378+
background-color: #f0f0f0;
379+
border: 1px solid #404040;
380+
}
381+
382+
div.deprecated span.versionmodified {
383+
color: #606060;
384+
font-weight: bold;
385+
}
386+
376387
div.green {
377388
color: #468847;
378389
background-color: #dff0d8;
379390
border: 1px solid #d6e9c6;
380391
}
381392

382-
383-
div.admonition p, div.warning p {
393+
div.admonition p, div.warning p, div.deprecated p {
384394
margin: 0.5em 1em 0.5em 1em;
385395
padding: 0;
386396
}
@@ -401,15 +411,14 @@ div.warning p.admonition-title {
401411
font-size: 14px;
402412
}
403413

404-
div.admonition {
414+
div.admonition, div.deprecated {
405415
margin-bottom: 10px;
406416
margin-top: 10px;
407417
padding: 7px;
408418
border-radius: 4px;
409419
-moz-border-radius: 4px;
410420
}
411421

412-
413422
div.note {
414423
background-color: #eee;
415424
border: 1px solid #ccc;

lib/matplotlib/axes/_base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,16 +1223,16 @@ def set_prop_cycle(self, *args, **kwargs):
12231223
self._get_lines.set_prop_cycle(prop_cycle)
12241224
self._get_patches_for_fill.set_prop_cycle(prop_cycle)
12251225

1226+
@cbook.deprecated('1.5', alternative='`.set_prop_cycle`')
12261227
def set_color_cycle(self, clist):
12271228
"""
12281229
Set the color cycle for any future plot commands on this Axes.
12291230
1230-
*clist* is a list of mpl color specifiers.
1231-
1232-
.. deprecated:: 1.5
1231+
Parameters
1232+
----------
1233+
clist
1234+
A list of mpl color specifiers.
12331235
"""
1234-
cbook.warn_deprecated(
1235-
'1.5', name='set_color_cycle', alternative='set_prop_cycle')
12361236
if clist is None:
12371237
# Calling set_color_cycle() or set_prop_cycle() with None
12381238
# effectively resets the cycle, but you can't do

0 commit comments

Comments
 (0)