8000 Highlight deprecations in the docs by timhoffm · Pull Request #10665 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Highlight deprecations in the docs #10665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,24 @@ div.warning {
border: 1px solid #eed3d7;
}

div.deprecated {
color: #606060;
background-color: #f0f0f0;
border: 1px solid #404040;
}

div.deprecated span.versionmodified {
color: #606060;
font-weight: bold;
}

div.green {
color: #468847;
background-color: #dff0d8;
border: 1px solid #d6e9c6;
}


div.admonition p, div.warning p {
div.admonition p, div.warning p, div.deprecated p {
margin: 0.5em 1em 0.5em 1em;
padding: 0;
}
Expand All @@ -401,15 +411,14 @@ div.warning p.admonition-title {
font-size: 14px;
}

div.admonition {
div.admonition, div.deprecated {
margin-bottom: 10px;
margin-top: 10px;
padding: 7px;
border-radius: 4px;
-moz-border-radius: 4px;
}


div.note {
background-color: #eee;
border: 1px solid #ccc;
Expand Down
10 changes: 5 additions & 5 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,16 +1219,16 @@ def set_prop_cycle(self, *args, **kwargs):
self._get_lines.set_prop_cycle(prop_cycle)
self._get_patches_for_fill.set_prop_cycle(prop_cycle)

@cbook.deprecated('1.5', alternative='`.set_prop_cycle`')
def set_color_cycle(self, clist):
"""
Set the color cycle for any future plot commands on this Axes.

*clist* is a list of mpl color specifiers.

.. deprecated:: 1.5
Parameters
----------
clist
A list of mpl color specifiers.
"""
cbook.warn_deprecated(
'1.5', name='set_color_cycle', alternative='set_prop_cycle')
if clist is None:
# Calling set_color_cycle() or set_prop_cycle() with None
# effectively resets the cycle, but you can't do
Expand Down
0