Skip to content

Support DiscreteNorm in scatter plot colorbars #162

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 12 commits into from
May 12, 2020
Merged

Conversation

lukelbd
Copy link
Collaborator

@lukelbd lukelbd commented May 11, 2020

Resolves #144. Now ax.scatter() accepts the exact same keyword arguments used to generate a DiscreteNorm as methods like ax.contourf() and ax.pcolormesh() -- if it detects that you passed an array of data values for the c argument.

@lukelbd
Copy link
Collaborator Author

lukelbd commented May 12, 2020

Decided to also throw in a bar plot bugfix in this PR -- it turns out #156 did not entirely solve the issues with grouped bar positions

@lukelbd lukelbd merged commit b002ea2 into master May 12, 2020
@lukelbd lukelbd deleted the scatter-discrete-norm branch May 12, 2020 06:49
@lukelbd
Copy link
Collaborator Author

lukelbd commented May 12, 2020

...and added a bugfix for the qt backend, because the examples I tested this on kept triggering recursive paint errors. Turned out that when setting the figure size after adding new panels to the figure (e.g. after making colorbars with ax.colorbar(m, loc='left')), this figure resize was triggering the canvas pre-processor, which triggered the tight layout algorithm and another figure resize, etc., etc. Added a breakout condition in the preprocessor that prevents this.

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.

scatter colorbar ignores boundaries when outside of plot
1 participant