-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ENH: more control on colorbar #872
Conversation
This looks great -- it is possible to add a test for some of this functionality? Take a look at the existing plotting tests and see if there's anything you can do easily. |
else: | ||
cbar_kwargs.setdefault('cax', cbar_ax) | ||
cbar = plt.colorbar(primitive, **cbar_kwargs) | ||
if darray.name and add_labels and 'label' not in cbar_kwargs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one corner case that may require checking is when add_colorbar = False
and cbar_ax
or cbar_kwargs
is specified. It might be worth checking and just raising an error. Unless you can think of a time when you want to be able to specify arguments that aren't used.
This is great. I had two small comments and agree that it could use some tests. |
This looks great. We just need a brief note for what's new now. |
Right, I always forget about this one. Let me know if I should rebase, too. |
No need to rebase. We can squash on the github side now. |
Yes, ok. [OT]: Some people on the mpl mailing list said it was a dangerous feature of github but I didn't understand why. I guess that for large PRs it might be useful to keep the intermediate commits, but for the majority of the cases it makes the git history much clearer I think. |
Yeah, I'm a big fan of squash-on-merge. It's much easier than forcing contributors to master |
Thanks @fmaussion ! |
Could you give an example on how to use this functionality when using faceting plots? For example, I have a 4 column figure and I would like to have the colorbar on top. |
Addresses #752 and allows to pass kwargs to colorbar. For example, it is now possible to do: