I am trying to create a 3-D stem plot using "stem3m" on a map of the US created by "usamap", but the stem plot is not appearing.
Here is my code:
% initialize figure and map axis
figure(1);ax = usamap('conus');% draw states with random colors
states = shaperead('usastatelo', 'UseGeoCoords', true,...'Selector',...{@(name) ~any(strcmp(name,{'Alaska','Hawaii'})), 'Name'});faceColors = makesymbolspec('Polygon',...{'INDEX', [1 numel(states)], 'FaceColor', ...polcmap(numel(states))}); %NOTE - colors are random
geoshow(ax, states, 'DisplayType', 'polygon', ...'SymbolSpec', faceColors)% draw stem plot
ptlat = [40 34 41 30 33]';ptlon = [-73 -118 -87 -95 -112]';%New York, Los Angeles, Chicago, Houston, Phoenix
ptz = [1 1.5 2 .5 1]';stem3m(ptlat,ptlon,ptz, 'r-', 'LineWidth', 3);% change view to see stem plot
view(3);
Best Answer