Skip to content

RGB image gets padded along dimension when plotting #9240

Discussion options

You must be logged in to vote

@mathause I have discovered the issue. I was plotting with imshow instead of pcolormesh in this snippet. As I have masked out data, the x and y coordinates were dropped. However, it seems that xarray.DataArray.plot uses pcolormesh by default, so it is robust to these changes, while imshow is not. I will be closing it here, but putting a note on my end on using xarray with an irregular coordinate grid on matplotlib.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ricardobarroslourenco
Comment options

@mathause
Comment options

@ricardobarroslourenco
Comment options

@ricardobarroslourenco
Comment options

Answer selected by ricardobarroslourenco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants