In [ ]:
import numpy as np
import geoviews as gv
from cartopy.examples import arrows
gv.extension('matplotlib')
gv.output(fig='svg', size=200)
In [ ]:
xs, ys, U, V, crs = arrows.sample_data()
mag = np.sqrt(U**2 + V**2)
angle = (np.pi/2.) - np.arctan2(U/mag, V/mag)
tiles = gv.tile_sources.Wikipedia
vectorfield = gv.VectorField((xs, ys, angle, mag), crs=crs)
In [ ]:
tiles.opts(zoom=4) * vectorfield.opts(magnitude='Magnitude', padding=0.1)