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

Configurable colorbar in iris.quickplot #5970

Open
trexfeathers opened this issue May 22, 2024 · 4 comments
Open

Configurable colorbar in iris.quickplot #5970

trexfeathers opened this issue May 22, 2024 · 4 comments
Labels
Good First Issue A good issue to take on if you're just getting started with Iris development

Comments

@trexfeathers
Copy link
Contributor

trexfeathers commented May 22, 2024

✨ Feature Request

I would like to be able to configure colorbar creation via kwargs in iris.quickplot functions.

Motivation

If I want to customise a plot using iris.quickplot, I can modify every element after creating the plot EXCEPT the colorbar (due to how Matplotlib works).

@rcomer

This comment was marked as outdated.

@pp-mo
Copy link
Member

pp-mo commented May 24, 2024

I'm not quite sure of the exact scope or intention here, but I would probably oppose any additions to the quickplot api.
IMHO iris.quickplot is a quick + simple one-stop shop. If you need more control, you should simply be using iris.plot instead.
If there is still a need for additional controls there, to do things which can't be done otherwise, then I'd say that is appropriate.

@trexfeathers
Copy link
Contributor Author

From @SciTools/peloton:

We prefer the simpler solution of 1 new parameter: colorbar, which defaults to True. If the user wants a customised colorbar then they should use False then add their own after creating the plot.

@trexfeathers trexfeathers added the Good First Issue A good issue to take on if you're just getting started with Iris development label May 29, 2024
@rcomer
Copy link
Member

rcomer commented May 29, 2024

I think the work here is:

  1. Add the boolean colorbar keyword to the _label function, which controls whether the colorbar is added.

  2. Do the "plumbing" to expose the colorbar keyword in every public plotting function that ultimately calls _label.

  3. Add tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue A good issue to take on if you're just getting started with Iris development
Projects
Status: No status
Development

No branches or pull requests

3 participants