How I can produce a colour contour map?
Show older comments
I have a data set in the form M=(180*360*12) where 180 is the latitude, 360 longitude and 12 is the averaged data for 12 months for 32 years. i want to plot contour map of it. i have proceeded this way, can somebody look into it and let me know what i am doing wrong here.
[lon lat]=Meshgrid(linspace(min(lon),max(lon)),linspace(min(lat),max(lat)));
contourf(lon,lat,M(:,3));
Thanks
3 Comments
Hydro
on 10 Dec 2014
Sean de Wolski
on 10 Dec 2014
So the mean for each month?
And each slice is monthological? Jan, Feb,...Dec, Jan, Feb,...Dec?
Hydro
on 10 Dec 2014
Answers (1)
Sean de Wolski
on 10 Dec 2014
Edited: Sean de Wolski
on 10 Dec 2014
contourf(M(:,:,3)) % all rows, columns and third page
You should also consider using contourm. Otherwise your lat/lon data will not be represent properly unless you project it into x/y using mfwdtran
Categories
Find more on Line 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!