Main Content

stem3m

Project stem plot on axesm-based map

Syntax

h = stem3m(lat,lon,z)
h = stem3m(lat,lon,z,LineSpec)
h = stem3m(lat,lon,z,PropertyName,PropertyValue,...)

Description

h = stem3m(lat,lon,z) displays a stem plot on the current axesm-based map. Stems are located at the points (lat,lon) and extend from an altitude of 0 to the values of z. The coordinate inputs should be in the same AngleUnits as the axesm-based map. It is important to note that the selection of z-values will greatly affect the 3-D look of the plot. Regardless of AngleUnits, the x and y limits of the axesm-based map are at most -π to +π and -π/2 to +π/2, respectively. This means that for most purposes, appropriate z values would be on the order of 1 to 3, not 10 to 30. The axes DataAspectRatio property can be used to adjust the appearance of the graphic. The handles of the displayed stem lines can be returned in h.

h = stem3m(lat,lon,z,LineSpec) specifies the line style, marker, and color.

h = stem3m(lat,lon,z,PropertyName,PropertyValue,...) allows any property/value pair recognized by the MATLAB® line function to be specified for the stems.

A stem plot displays data as lines extending normal to the xy-plane, in this case, on a map.

Examples

collapse all

Project a stem plot on a map.

load coastlines
axesm sinusoid; 
view(3)
h = framem; 
set(h,'zdata',zeros(size(coastlat)))
plotm(coastlat,coastlon)
ptlat = [0 30 30 -50 -78]';
ptlon = [0 30 -70 65 -35]';
ptz = [1 1.5 2 .5 1]';
stem3m(ptlat,ptlon,ptz,'r-')

Figure contains an axes object. The axes object contains 4 objects of type patch, 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
"o"Circle

Sample of circle marker

"+"Plus sign

Sample of plus sign marker

"*"Asterisk

Sample of asterisk marker

"."Point

Sample of point marker

"x"Cross

Sample of cross marker

"_"Horizontal line

Sample of horizontal line marker

"|"Vertical line

Sample of vertical line marker

"square"Square

Sample of square marker

"diamond"Diamond

Sample of diamond 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

"pentagram"Pentagram

Sample of pentagram marker

"hexagram"Hexagram

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