Ruth Comer
Ruth Comer
Looks like the image is only worked out at the first draw, and there is a comment in the code that suggests there was an intention to change that at...
I see someone has posted a workaround on StackOverflow: https://stackoverflow.com/a/78804739/3501128
I believe I have narrowed this down: https://github.com/dask/dask/issues/11296
@valeriupredoi there is now a fix on dask `main` branch. Are you able to test your case(s) with that?
Think https://github.com/SciTools/cf-units/pull/279 may be relevant here.
I would be happy to either write or review a PR for this.
> Why can't you use `cube.coord_system().as_cartopy_crs()` or `cube.coord_system().as_cartopy_projection()` ?? I think that is illustrated in [the logic that `iris.plot` currently uses](https://github.com/SciTools/iris/blob/2056703a0a84d1b9ee9f6e314e38c2156a8988b0/lib/iris/plot.py#L930-L965): sometimes there isn't a coord system on the cube,...
Thanks for the clear report @nmstreethran. I confirm that I can reproduce this in a script if I replace the `plt.show()` with `plt.savefig('test.png', bbox_inches='tight')`. In notebooks the `bbox_inches='tight'` is automatic....
I added some prints to try to debug this ```diff diff --git a/lib/cartopy/mpl/gridliner.py b/lib/cartopy/mpl/gridliner.py index c750a754..6e1e1acb 100644 --- a/lib/cartopy/mpl/gridliner.py +++ b/lib/cartopy/mpl/gridliner.py @@ -1277,4 +1277,6 @@ class Label: overlapping = self.path.intersects_path(label.path)...
Thanks @schlunma, unfortunately this is a long-standing known problem, and hard to track down. One possible work-around is to use the `transform_first` option, which should also make it plot faster....