Skip to content

Support DiscreteNorm in scatter plot colorbars - #162

Merged
lukelbd merged 12 commits into
masterfrom
scatter-discrete-norm
May 12, 2020
Merged

Support DiscreteNorm in scatter plot colorbars#162
lukelbd merged 12 commits into
masterfrom
scatter-discrete-norm

Conversation

@lukelbd

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
CollaboratorAuthor

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 masterMay 12, 2020
@lukelbd
lukelbd deleted the scatter-discrete-norm branch May 12, 2020 06:49
@lukelbd

Copy link
Copy Markdown
CollaboratorAuthor

...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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scatter colorbar ignores boundaries when outside of plot

1 participant

@lukelbd