matplotlib quiver plot behaves differently after using the set_UVC method

Viewed 163

I'm making a quiver plot over the Arctic ocean and I'm finding that when I make the initial plot, it looks one way, and then when I use the set_UVC method (which shouldn't change it) then it looks different!

Code snippet:

fig = plt.figure(figsize=(10,10))

ax = plt.axes(projection=ccrs.NorthPolarStereo())
ax.set_extent([-180, 180, 90, 65], ccrs.PlateCarree())    

ax.add_feature(cartopy.feature.LAND, edgecolor='black',zorder=1)
ax.margins()

s = 2
scale = 500
size_lim = 1000

ind = 0

u = IMV_big[0][ind]
v = IMV_big[1][ind]

u,v = transform(-45,u,v) # rotates vectors by 45 degrees

qv =   ax.quiver(lons[::s,::s],
                 lats[::s,::s],
                 u[::s,::s],
                 v[::s,::s],
                 transform=ccrs.PlateCarree(),
                 scale=scale,
                )

# qv.set_UVC(u[::s,::s],v[::s,::s])

plt.show()

Here's the plot with qv.set_UVC commented out:

enter image description here

And here with it functional:

enter image description here

I think this is totally bizarre behaviour, if anybody can enlighten me as to why it's happening I'd be very grateful!

0 Answers
Related