For Programmers: Free Programming Magazines  


Home > Archive > Matlab > February 2007 > contourfm loses filled contours when changing lat and lon limits









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author contourfm loses filled contours when changing lat and lon limits
Darren Rayner

2007-02-28, 7:14 pm

I am plotting a filled controu map using contourfm. I set up a useful
colour scheme and it looked ok. However when zooming the data using
setm(gca,'flatlim',[]) or replotting using the same data with
different flat and flon limits one of the previously filled contours
is not drawn. Anybody got an idea why and if so how to remedy this?

The code below loses the contour after the second pause, so through
changing the lat limit to a value that does not have the deeper data.

CODE:

axesm('mercator','FLatLimit',[30 50],'Flonlimit',[-75
- 50],'parallellabel','on','meridianlabel'
,'on','plabellocation',10,'ml
abellocation',10);

depths=[0 -500 -1500 -2500 -3500 -4500 -5500 -7000];
[bathy,bathy_handle]=contourfm(etopo2bat
hy.lat,etopo2bathy.lon,etopo2b
athy.depth,depths,'k');

colormap(colours2);
colorbar
pause
setm(gca,'FLonLim',[-71 -66])
pause
setm(gca,'FLatLim',[33 41])
pause
tightmap
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com