How can I plot land over a scatter plot? and how can I change the axis tickmark location?
Mostrar comentarios más antiguos
Problem 1:
I have a scatter plot (shown in attached picture), but I want to plot land over this and extend the space to -90:90 in the latitude.
Problem 2:
The scattered data has to be flipped by 90 degrees and the latitude reversed. I can do this, but I then get the tickmarks on the right of the plot and would like it back on the left.
End result:
I would like a map showing scattered data with land coloured in black and areas where no data in white (i.e. the blobs within the ocean and above 66 degrees north and south. I guess I can just extend the lat by the tickmark locations but then I need to plot land here aswell (e.g. Antarctica)
here is my code so far (after loading in data):
% REF_lat & REF_lon = (3127 x 254)
% mask & sl = (3127 x 254)
% interpolate land mask into same dimensions as scattered data:
F=griddedInterpolant({latt,lonn'},mask);
m=F(y,x);
m(find(m<1 & m>0)) = 1;
m(find(isnan(m)))=0;
sl = s.*m;
h = scatter(REF_lat(:),REF_lon(:),10,sl(:));
[r,c] = find(isnan(h)) ;
hold on ;
plot(c, r, 'ko') ;
set(gca,'YDir','reverse');
camroll(90)
1 comentario
Michael
el 23 de Sept. de 2014
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Map Display en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
