MATLAB: Plot grid data with lat and lon

grid dataplot

Hi,
I am trying to map some data with latitude and longitude with their velocity vectors. I have already horizontal velocities on map by below code, but I want to have vertical velocities as different vectors on same map (simultaneously).
worldmap([-45 -10],[110 155])
load coast
geoshow(lat,long)
hold on
quiverm(lati,longi,ul,ug,'m')
hold on
stem3m(lati,longi,uu,'r-')
tightmap
But I have nothing for stem3m???? just have horizontal velocities on map.
How can I have two vector for each point (lat,lon)? one horizontal and another vertical???
Many thanks, Mahdiyeh

Best Answer

This may give you what you want:
lat = -89.5:0.5:90; lon = 0:359;
data = sin(lat/180*pi)'*sin(lon/360*pi); % sample 360 by 360 data array:
figure(1); % Flat, color-coded map
h2 = surf(lon,lat,data); view([0,90]); axis([0,360,-90,90]);
set(h2,'edgecolor','none'); % remove edges
figure(2); % Sphere plot
[x,y,z] = sphere(360); h = surf(x,y,z,data); set(h,'edgecolor','none'); axis equal