geoshow versus pcolorm versus meshm (and versus contourfm)
1 view (last 30 days)
Show older comments
I have a geophysical dataset on a [lat,lon] grid. I would like to plot a map (such as with pcolorm, meshm) that shows the correlation between a time series at each grid point and another time series. However, as I understand pcolorm and meshm use the [lat,lon] coordinates as cell vertices rather than centers. To avoid this, I tried geoshow instead, and compared the results to shifting [lat,lon] manually by half the grid cell width. The results are not the same (boxes are slightly shifted). Also, I cannot use contourfm, which should assume centered [lat,lon] points, because my data cannot be smoothly interpolated. Please advise me on which function is correct. Here is an example.
figure; worldmap([0 75],[-85,0]); colormap('jet');
[lonsmesh,latsmesh]=meshgrid(lons,lats);
%pcolorm(latsmesh-2.5,lonsmesh-2.5,coeffs); geoshow(latsmesh,lonsmesh,coeffs,'DisplayType','texturemap');
hg=geoshow('landareas.shp', 'FaceColor', [0.5 0.7 0.5]); load coast;
caxis([-1 1]);
0 Comments
Answers (0)
See Also
Categories
Find more on Purple 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!