Main Content


Project 3-D quiver plot on map axes


h = quiver3m(lat,lon,alt,dlat,dlon,dalt)
h = quiver3m(lat,lon,alt,dlat,dlon,dalt,LineSpec)
h = quiver3m(lat,lon,alt,dlat,dlon,dalt,LineSpec,'filled')
h = quiver3m(lat,lon,alt,dlat,dlon,dalt,scale)
h = quiver3m(lat,lon,alt,dlat,dlon,dalt,LineSpec,scale)
h = quiver3m(lat,lon,alt,dlat,dlon,dalt,LineSpec,scale,'filled')


h = quiver3m(lat,lon,alt,dlat,dlon,dalt) displays velocity vectors with components (dlat,dlon,dalt) at the geographic points (lat,lon) and altitude alt on a displayed map axes. The inputs dlat, dlon, and dalt determine the direction of the vectors in latitude, longitude, and altitude, 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 = quiver3m(lat,lon,alt,dlat,dlon,dalt,LineSpec) specifies the line style, marker, and color. If you use markers, they are plotted at the start points of the vectors, i.e., the input points (lat,lon,alt).

h = quiver3m(lat,lon,alt,dlat,dlon,dalt,LineSpec,'filled') results in the filling in of any symbols specified by LineSpec.

h = quiver3m(lat,lon,alt,dlat,dlon,dalt,scale), h = quiver3m(lat,lon,alt,dlat,dlon,dalt,LineSpec,scale) and h = quiver3m(lat,lon,alt,dlat,dlon,dalt,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,alt) to (lat+dlat,lon+dlon,alt+dalt).


collapse all

Plot 3-D quiver vectors from London (51.5°N,0°) and New Delhi (29°N,77.5°E), both at an altitude of 0. Suppress the automatic scaling. Terminate both vectors at an altitude of 1; the London vector should terminate 100° southward and 70° eastward, while the New Delhi vector should terminate 50° northward and 10° eastward.

load coastlines
axesm miller; 
lat0 = [51.5,29]; 
lon0 = [0 77.5]; 
alt = [0 0];
dlat = [-40 50]; 
dlon = [-70 10]; 
dalt = [1 1];

Figure contains an axes object. The axes object contains 3 objects of type line.

More About

collapse all

Line Style, Marker, and Color

Specify the line style, marker, and color as a character vector or string containing symbols. The symbols can appear in any order. You do not need to specify all three characteristics (line style, marker, and color). For example, specify a red dashed line using '--r'.

Line StyleDescriptionResulting Line
'-'Solid line

Sample of solid line

'--'Dashed line

Sample of dashed line

':'Dotted line

Sample of dotted line

'-.'Dash-dotted line

Sample of dash-dotted line, with alternating dashes and dots

MarkerDescriptionResulting Marker

Sample of circle marker

'+'Plus sign

Sample of plus sign marker


Sample of asterisk marker


Sample of point marker


Sample of cross marker

'_'Horizontal line

Sample of horizontal line marker

'|'Vertical line

Sample of vertical line marker


Sample of square marker


Sample of diamond line marker

'^'Upward-pointing triangle

Sample of upward-pointing triangle marker

'v'Downward-pointing triangle

Sample of downward-pointing triangle marker

'>'Right-pointing triangle

Sample of right-pointing triangle marker

'<'Left-pointing triangle

Sample of left-pointing triangle marker


Sample of pentagram marker


Sample of hexagram marker

Color NameShort NameRGB TripletAppearance
'red''r'[1 0 0]

Sample of the color red

'green''g'[0 1 0]

Sample of the color green

'blue''b'[0 0 1]

Sample of the color blue

'cyan' 'c'[0 1 1]

Sample of the color cyan

'magenta''m'[1 0 1]

Sample of the color magenta

'yellow''y'[1 1 0]

Sample of the color yellow

'black''k'[0 0 0]

Sample of the color black

'white''w'[1 1 1]

Sample of the color white

Version History

Introduced before R2006a

See Also