You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When plotting an image with imshow the top and bottom line of pixels has half the width of the rest of lines and the image does not fill the whole extent.
This is not noticeable when the image is big, but is very clear when the image has low resolution.
Digging into this, it looks like a bug that has been around since basically the beginning of Cartopy! Thanks for the great examples. I just put up a PR at #2461 if you want to give that a try for some other cases.
Digging into this, it looks like a bug that has been around since basically the beginning of Cartopy! Thanks for the great examples. I just put up a PR at #2461 if you want to give that a try for some other cases.
It is solved! Thanks @greglucas and @rcomer for the amazingly fast reply and fix
Description
When plotting an image with imshow the top and bottom line of pixels has half the width of the rest of lines and the image does not fill the whole extent.
This is not noticeable when the image is big, but is very clear when the image has low resolution.
Code to reproduce
Slightly modified from here: https://scitools.org.uk/cartopy/docs/v0.5/matplotlib/introductory_examples/04.images.html
Produces this plot. While I would expect it to fill the whole area.
By increasing the number of lines, we can see that the top and bottom lines have half the height.
The effect is not noticeable if the code is run with
img_shape=[1000, 4]
Full environment definition
Operating system
Tried it with different Linux distributions: Ubuntu 22.04, AlmaLinux9
Cartopy version
0.24
conda list
The text was updated successfully, but these errors were encountered: