pcolor/m_pcolor cannot create world map correctly
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rong Yu
am 26 Mai 2015
Kommentiert: Chad Greene
am 9 Jun. 2015
Hello all,
I have an issue to create world mean temperature map correctly with pcolor/m_pcolor. There are strips on the map created. Please see the first map.
h1 = pcolor(lon,lat,statTa(:,:,i)); set(h1,'edgecolor','none'); colorbar;
When I use imagesc, it shows pretty well. Please see the second map. But I think I prefer to use pcolor/m_pcolor to create map since they are more powerful on creating maps. Please help me on what happened when I was using pcolor here. Thank you very much!
h2 = imagesc(lon,lat,statTa(:,:,i)); set(gca,'ydir','normal'); colorbar;
11 Kommentare
Mike Garrity
am 9 Jun. 2015
What version of MATLAB are you using? That looks like an issue that was fixed in R2014b. Is your version older than that, or newer?
Akzeptierte Antwort
Chad Greene
am 9 Jun. 2015
This question has been answered in the comments above, but in case anyone else runs into this problem again, here's an easier-to-find version of the solution. This is a rendering issue in Matlab versions pre-R2014b. Type
set(gcf,'renderer','opengl')
If that doesn't work, try
set(gcf,'renderer','painters')
and if that doesn't work, try
set(gcf,'renderer','zbuffer')
1 Kommentar
Chad Greene
am 9 Jun. 2015
Rong, if this solution worked for you, please click "Accept this answer" so it'll get top-posted.
Weitere Antworten (1)
Chad Greene
am 8 Jun. 2015
I see that when you use pcolor your axis values are not lat,lon values. Looks like linear indices of rows and columns. Are you sure you're plotting lat and lon?
Siehe auch
Kategorien
Mehr zu Mapping Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!