Open markusReinert opened 6 months ago
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! If you have an idea for a solution, we would really welcome a Pull Request with proposed changes. See the Contributing Guide for more. It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better. Thank you!
What happened?
When creating a quiver plot of an xarray Dataset using
ds.plot.quiver
, there are empty spots in the wrong places. This problem only seems to occur when ahue
array is given toquiver
and the data is masked, i.e., there areNaN
values in the array. The empty spots are not only in the masked locations, but seem to appear in arbitrary locations.What did you expect to happen?
Plotting the same data with the matplotlib function
plt.quiver
, the empty spots are not there, no matter if there is ahue
(calledcolor
in matplotlib) orNaN
values. This is the result I expected, and I expect that the xarray plot method gives the same result.Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
No response
Anything else we need to know?
This is the figure that is created with the example code. The problems are the empty spots in the top right panel. I expected this panel to look like the bottom right panel. The left column shows that there are no problems when there is no hue/color argument. The quiver plot created with xarray looks just like the one created manually with matplotlib.
Environment