-
Notifications
You must be signed in to change notification settings - Fork 300
fixed colorbar issue #1112
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
fixed colorbar issue #1112
Conversation
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.
And add a tests.skip_plot decorator here.
|
Since #1109 was merged the tests need minor modifications. It doesn't look like this will cater for 1d plots such as |
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.
Fantastic spot, I didn't realise our contourf made two calls.
Seems to work for me: |
|
Over to you @esc24 |
Because @esc24 has added a commit to make it work since I made that comment. |
|
I just noticed that the first argument of Now that the draw method is not explicitly used, it is extremely unclear from the code how we end up with a draw method that belongs to Could you take a stab at restructuring this area of the code? I think we just need to make it clear (and explicit) how we get a |
I was trying to keep this change a light touch bug fix, rather than a structural change given the complex (some might say convoluted) way the plot code works. I agree it needs an overhaul, but I'd rather not do it as part of a bug fix. Having said that I'm happy to modify and rename the helper functions so it's clearer how one ends up with a geoaxes instance. |
That'd be a good start, please go ahead. My concern is that leaving the code in in its current state will lead to other modifications to the plot code being poorly designed, as it is quite confusing. It's be nice to get this straightened out earlier rather than later. Whatever you can do to help would be great! |
|
@ajdawson - I've a numbers of small changes that hopefully make the logic clearer. |
|
@esc24 - that looks a lot better, I'm happy with these changes. |
|
@esc24 - could you squash the 3 commits on this branch to keep the history on master as clean as possible? |
|
Thanks @esc24. |
This PR modifies the behaviour of the
iris.plotfunctions so that rather than callingax.draw_functhey callplt.draw_func. This is currently the case for non-map type plots, but anything going via cartopy via_map_commonmoves from thepltfunctions to geoaxes methods. This has an undesirable side effect that means subsequent calls toplt.colorbar()break when usingiris.plot.contour,iris.plot.pcolormeshetc. rather than theirpltequivalents.Fixes #1111.