Open trexfeathers opened 3 months ago
I think the work here is:
Add a colorbar_kwargs
keyword to the _label
function, which is a dictionary of keywords to use in the colorbar
call. If "orientation" or "drawedges" is in that dictionary, they should override the current choices. If "location" is in the dictionary, then "orientation" should not be passed. If "label" is in the dictionary, the set_label
call should be skipped.
Do the "plumbing" to expose colorbar_kwargs
in every public plotting function that ultimately calls _label
.
Add tests.
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.
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.
I think the work here is:
Add the boolean colorbar
keyword to the _label
function, which controls whether the colorbar is added.
Do the "plumbing" to expose the colorbar
keyword in every public plotting function that ultimately calls _label
.
Add tests.
✨ 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).