Can I make a surface or colormap with latitude, longitude, and concentration using MATLAB? (photo example)

4 views (last 30 days)
Hi there,
I am assisting in some research based on climate model outputs. I have datasets for various values (e.g. CO2 concentration, water vapor concentration) at various latitude and longitudes (of systematic intervals). I also need to create similar colored maps for latitude vs. altitude. [Picture examples are linked to below.] I basically have the datasets in txt files that are about a 20 x 20 matrix based on the lat/long intervals.
Can I create these graphs using MATLAB? How should I go about doing this?
Thank you so much!

Accepted Answer

Patrick Kalita
Patrick Kalita on 17 Aug 2011
Have you looked at the pcolor function? Here's an example:
[x,y,z] = peaks;
Based on your example pictures, you may also want to do this:
shading interp
The "vertical" picture also appears to have some contour lines:
[x,y,z] = peaks;
shading interp
hold on
contour(x,y,z, [-2, 2], 'EdgeColor', 'k');
Other commands you might want to look at: clabel, colorbar.
Patrick Kalita
Patrick Kalita on 19 Aug 2011
I was just using the PEAKS function to generate sample data. Don't use that in your actual plot. Substitute your own data for x, y, and z.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by