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

Skip to content

Commit 2bfb08c

Browse files
authored
Merge pull request #10665 from timhoffm/deprecated-css
Highlight deprecations in the docs
2 parents ebc3aa0 + 2c3809f commit 2bfb08c

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
@@ -1218,16 +1218,16 @@ def set_prop_cycle(self, *args, **kwargs):
12181218
self._get_lines.set_prop_cycle(prop_cycle)
12191219
self._get_patches_for_fill.set_prop_cycle(prop_cycle)
12201220

1221+
@cbook.deprecated('1.5', alternative='`.set_prop_cycle`')
12211222
def set_color_cycle(self, clist):
12221223
"""
12231224
Set the color cycle for any future plot commands on this Axes.
12241225
1225-
*clist* is a list of mpl color specifiers.
1226-
1227-
.. deprecated:: 1.5
1226+
Parameters
1227+
----------
1228+
clist
1229+
A list of mpl color specifiers.
12281230
"""
1229-
cbook.warn_deprecated(
1230-
'1.5', name='set_color_cycle', alternative='set_prop_cycle')
12311231
if clist is None:
12321232
# Calling set_color_cycle() or set_prop_cycle() with None
12331233
# effectively resets the cycle, but you can't do

0 commit comments

Comments
 (0)