How to plot contourf data on m-map polar stereographic projection?
19 views (last 30 days)
Show older comments
I have a code which plots the coastlines, with a stereographic projection over the north pole: see http://postimg.org/image/voc1cpygv/
This is the code which produces it:
m_proj('stereo','lat',90,'rad',70,'lon',0)
figure(1)
m_gshhs_i('patch',[.3 .6 .4]);
hold on
m_grid('XAxisLocation','bottom')
I have wind data for the northern hemisphere at 2.5 x 2.5 degree grid points. i.e
wind = [0 0 0 3 4 2 0
4 0 0 2 2 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 4 0 0 0 0 0]; (except a size of [36:144])
How do I produce a plot like this one:
Thanks for any help :)
0 Comments
Answers (1)
Chad Greene
on 17 Jan 2015
I have not used M-Map, but you can easily transform your lat/lon coordinates to polar stereographic coordinates with polarstereo_fwd, then plot using standard Matlab commands like plot, patch, contourf, etc. Given lat/lon arrays of coastlines and gridded lat/lon for the wind data,
[coastx,coasty] = polarstereo_fwd(coastlat,coastlon);
[gridx,gridy] = polarstereo_fwd(gridlat,gridlon);
imagesc(gridx,gridy,wind)
hold on
plot(coastx,coasty)
1 Comment
See Also
Categories
Find more on Polar Plots 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!