Prev: Half complex FFT
Next: file read
From: Jax Cao on 20 Jul 2010 00:32 Hi, I had issues in drawing worldmap after imshow or surf commands, hope somebody could help me. I put the corresponding problematic figures at http://jaxforum.webs.com/apps/photos/album?albumid=9550438 for your information. Here are the codes with my comments parenthesized: sz = get(0, 'ScreenSize'); im1 = rand(300); latlim = [20 83]; lonlim = [-180 -80]; handle = figure('position', [150 150 sz(3)*3/5 sz(3)*3/10]); ah1 = axes('parent', handle, 'position', [0.04 0.06 .45 .88]); ah2 = axes('parent', handle, 'position', [0.53 0.06 .45 .88]); axes(ah1) imshow(im1) worldmap(latlim, lonlim) {Two problems occur. First, there is a rectangular box overlapping the right side of the figure. Second, the worldmap is drawn upside down. if I type} worldmap(latlim, lonlim) {this removes the box but the map is still upside down. Draw worldmap in the second axes} axes(ah2) worldmap(latlim, lonlim) {Now the worldmap is correct} drawing worldmap after surf command is even worse. If I draw surf after worldmap I should use hold off to remove the effect of the world map. However there is always the problem with the worldmap command after surf. I did: delete(handle); delete(ah1); delete(ah2); handle = figure('position', [150 150 sz(3)*3/5 sz(3)*3/10]); ah1 = axes('parent', handle, 'position', [0.04 0.06 .45 .88]); ah2 = axes('parent', handle, 'position', [0.53 0.06 .45 .88]); axes(ah1) surf(peaks) worldmap(latlim, lonlim) axes(ah2) surf(peaks) hold off worldmap(latlim, lonlim) both axes produce the same funny pictures. Thanks, Jax Cao
|
Pages: 1 Prev: Half complex FFT Next: file read |