Skip to content
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

BUG: symmetric kwarg in locator is not honored by contourf #7271

Closed
efiring opened this issue Oct 14, 2016 · 1 comment
Closed

BUG: symmetric kwarg in locator is not honored by contourf #7271

efiring opened this issue Oct 14, 2016 · 1 comment
Assignees

Comments

@efiring
Copy link
Member

efiring commented Oct 14, 2016

Specifying a locator object via a kwarg to contourf results in levels coming from a call to tick_values, which bypasses the view_limits calculation. This means that setting the 'symmetric =True' kwarg in a MaxNLocator passed to contourf has no effect. One way to fix this would be to revert 354d133, which removed the use of a dummy axis in contourf. Another way would be to use the symmetric setting in tick_values itself. A third would be to allow the Locator.__call__ method to take vmin, vmax arguments, avoiding the need to explicitly create a dummy axis and set its limits.

My inclination is to do the quick fix--revert 354d133--in v2.x, and then switch to something like the third option for 2.1 or later.

@efiring
Copy link
Member Author

efiring commented Oct 14, 2016

It looks like there is more to it than I thought. To be continued...

efiring added a commit to efiring/matplotlib that referenced this issue Oct 17, 2016
A likely use case is contouring fields such as a velocity
component, where one wants to use a diverging colormap
centered on zero.
Closes matplotlib#7271.
@efiring efiring self-assigned this Oct 17, 2016
@NelleV NelleV changed the title BUG: symmetric kwarg in locator is not honored by contourf [MRG+1] BUG: symmetric kwarg in locator is not honored by contourf Oct 17, 2016
@NelleV NelleV changed the title [MRG+1] BUG: symmetric kwarg in locator is not honored by contourf BUG: symmetric kwarg in locator is not honored by contourf Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants