Project 2-D quiver plot on map axes


h = quiverm(lat,lon,u,v)
h = quiverm(lat,lon,u,v,linespec)
h = quiverm(lat,lon,u,v,linespec,'filled')
h = quiverm(lat,lon,u,v,scale)
h = quiverm(lat,lon,u,v,...linespec,scale,'filled')


h = quiverm(lat,lon,u,v) displays velocity vectors with components (u,v) at the geographic points (lat,lon) on displayed map axes. All four inputs should be in the AngleUnits of the map axes. The inputs u and v determine the direction of the vectors in latitude and longitude, respectively. The function automatically determines the length of these vectors to make them as long as possible without overlap. The object handles of the displayed vectors can be returned in h.

h = quiverm(lat,lon,u,v,linespec) allows the control of the line specification of the displayed vectors with a linespec string recognized by the MATLAB® line function. If symbols are indicated in linespec, they are plotted at the start points of the vectors, i.e., the input points (lat,lon).

h = quiverm(lat,lon,u,v,linespec,'filled') results in the filling in of any symbols specified by linespec.

h = quiverm(lat,lon,u,v,scale) and h = quiverm(lat,lon,u,v,...linespec,scale,'filled') alter the automatically calculated vector lengths by multiplying them by the scalar value scale. For example, if scale is 2, the displayed vectors are twice as long as they would be if scale were 1 (the default). When scale is set to 0, the automatic scaling is suppressed, and the length of the vectors is determined by the inputs. In this case, the vectors are plotted from (lat,lon) to (lat+u,lon+v).


Plot quiver vectors from Land's End (50ºN,5.4ºW) and Majorca (39.7ºN,2.9ºE) in a direction corresponding to +5º latitude and +3º longitude. Use automatic scaling.

load coast
axesm('eqaconic','MapLatLimit',[30 60],'MapLonLimit',[-10 10])
framem; plotm(lat,long)
lat0 = [50 39.7]; lon0 = [-5.4 2.9];
u = [5 5]; v = [3 3];

See Also


Was this topic helpful?