Skip to content

Mnt cn passthrough #6499

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 4 commits into from
May 30, 2016
Merged

Mnt cn passthrough #6499

merged 4 commits into from
May 30, 2016

Conversation

tacaswell
Copy link
Member

This is an attempt to close #6380

The first 4 commits on this are relatively un-controversial. They

  • remove unreachable code
  • switch to using the public cycler API
  • remove the implicit cycler added in _base.py however this changes the 'default' line color back to 'C0' which resolves to 'b' in the global prop_cycler so change the tests to specify 'k' as the color to keep the test passing.

The 5th commit makes to_rgba take in a cycler to use for local CN look up. In the cases where we are going through _process_plot_format in _get_lines we can easily get the Axes property cycler in, however in many other cases where we want to use CN (such as in Line2D which gets it's default color from rcparam, which may be 'CN' and actually calls to_rgba at some later point) may not even be associated with an Axes object so when CN gets resolved so it has to use the global property cycler. With the 5th commit we have the situation where if the user lets the color be 'C0' via the call or via the rcparams, there will be different results.

Having typed this out I am inclined to rip that commit off, but leaving for comment.

I would be comfertable doing the beta having with the first 4 commits merged, but not the 5th.

tacaswell added 4 commits May 29, 2016 18:36
The validation on the rcParams means that `rcParams['axes.prop_cycle']`
can never be None.
 - _transpose() -> by_key()
 - be pedantic about return types
@tacaswell tacaswell added this to the 2.0 (style change major release) milestone May 29, 2016
@tacaswell
Copy link
Member Author

also @WeatherGod was right, this is a horrible can of worms.

@efiring
Copy link
Member

efiring commented May 29, 2016

Leaving out the last commit, we have what I think we agreed on a while back: C0 is defined as the first color in the global color cycle. 98% of users will stick with the global cycle, and the remaining 2% are presumably sophisticated enough to figure out what to do to get their desired effect.

@tacaswell tacaswell force-pushed the mnt_cn_passthrough branch from 5e77085 to dfa14fe Compare May 30, 2016 00:32
@tacaswell
Copy link
Member Author

@efiring done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants