How can I plot land over a scatter plot? and how can I change the axis tickmark location?
Show older comments
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)
Accepted Answer
More Answers (0)
Categories
Find more on Map Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!