Add world map background to contour plot
Show older comments
Hello,
I'm pretty new to MATLAB, & have the basic 2012b version with no toolboxes.
I have an outline map of the USA in .gif format (759x381 pixels), which I can display. I also have a contourf plot of temperature for the same latitudes/longitudes as the USA map, which I can also display.
I'd like to plot the contourf on top of the USA map, and have the colors of the contourf be semi-transparent so the map below can be seen.
The problem I'm running into is that I can't get them the same size. If I do the map first, the contourf just fills a tiny portion in the upper left of the figure. If I do the contourf first, only the very upper left portion of the map is plotted.
I found a function that makes the USA map gif smaller by scaling, however this causes an unacceptable loss of resolution. So, I'd like to know how to make the contourf plot bigger so it's the same dimensions as the USA map (759*381 pixels).
Thanks you for any help you can give!!
1 Comment
Jonathan Epperl
on 7 Feb 2013
Please show us the code you have so far, it's a lot harder to help if as a first step we have to figure out what you have done.
Accepted Answer
More Answers (3)
John
on 7 Feb 2013
0 votes
Kostas
on 8 Feb 2013
0 votes
If you had the Map toolbox, that would be quite easy to make it. Now i would suggest you to google for the M_Map: A mapping package for Matlab and see the examples there
t_123
on 4 Jun 2013
0 votes
hey i have the same doubt ..i have to plot temp climatological data and to plot it in world map..i have converted both the images on jpg format..but dnt knw how to plot it together.pls help
1 Comment
t_123
on 4 Jun 2013
bcoz when m plotting its showing the error.. ??? Index exceeds matrix dimensions.
Error in ==> ind2rgb at 27 r = zeros(size(a)); r(:) = cm(a,1);
Error in ==> worldmap at 15 RGB = ind2rgb(I,Imap) and m using the same code u given above
Categories
Find more on Contour 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!