Update two_scales.py example.#7455
Merged
tacaswell merged 1 commit intomatplotlib:masterfrom Nov 15, 2016
Merged
Conversation
291911f to
e6cf398
Compare
tacaswell
reviewed
Nov 14, 2016
examples/api/two_scales.py
Outdated
| for tl in ax1.get_yticklabels(): | ||
| tl.set_color('b') | ||
|
|
||
| ax1.set_ylabel('exp', color='r') |
Member
There was a problem hiding this comment.
should this be 'b' to match the ticks?
e6cf398 to
5662640
Compare
Kojoley
approved these changes
Nov 14, 2016
Kojoley
reviewed
Nov 14, 2016
examples/api/two_scales.py
Outdated
| for tl in ax1.get_yticklabels(): | ||
| tl.set_color('b') | ||
|
|
||
| ax1.tick_params('y', color='b', labelcolor='b') |
Member
There was a problem hiding this comment.
Could not this be tick_params('y', colors='b')?
Contributor
Author
There was a problem hiding this comment.
I didn't know that kwarg... fixed.
The docstring refers to the non-existing `axes.py`, and mentions having to remove the rectangular frame, which is no longer the case. I also suspect that it was written when `twiny` didn't exist yet... Use `tick_params` instead of iterating over the ticks.
5662640 to
1e3492f
Compare
NelleV
approved these changes
Nov 14, 2016
Member
|
Thanks @anntzer for the improvements! |
tacaswell
added a commit
that referenced
this pull request
Nov 15, 2016
DOC: Update two_scales.py example.
Member
|
Thanks! Backported to v2.x as eace7a6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The docstring refers to the non-existing
axes.py, and mentions havingto remove the rectangular frame, which is no longer the case. I also
suspect that it was written when
twinydidn't exist yet...Use
tick_paramsinstead of iterating over the ticks.