|
Hello,
I am still trying to solve a problem of removing NaN data
from my image created using geoshow. The NaN data is
visible as the lowest values from the colorbar. I changed
this to purple for better visualization:
http://i14.photobucket.com/albums/a345/ture1945/Junk/bad_NaN
.jpg
I tried to make the NaN values transparent using
Alphadata but it does not seem to be working. I am not sure
if this is my bad programming or that Alphadata doesn't
work in geoshow? My code is at the bottom of this post.
Some questions I have:
1) Does goeshow produce a surface, axes, or object? The
help seems to refer to all three...
2) Does AlphaData work with geoshow? I don't seem to be
getting errors but I can't get the result I want (likely
bad writing on my part).
******************************************
% zf is a matrix of ocean temperatures
inzf=ones(720,1440);
inzf(isnan(zf))=0; % index where NaNs are zeros
figure
geoidrefvec=[4 90 0];
geoidlegend=[4 90 0];
axesm('MapProjection','pcarree','FLatLimit',[10
50],'FLonLimit',[110 150],...
'FLineWidth',
[2],'Grid','on','GColor','black','MeridianLabel','on',...
'MLabelLocation',[10],'MLineLocation',
[2],'MLabelParallel','south',...
'ParallelLabel','on','PLabelLocation',[10],'PLineLocation',
[2])
Hg2=geoshow(zf,
geoidrefvec, 'DisplayType', 'texturemap','FaceAlpha','textur
emap'...
,'AlphaDataMapping','direct','AlphaData',inzf);
caxis([-3 3])
set(gcf,'colormap',Ac)
colorbar
set(gcf,'units','inches')
set(gcf,'position',[1 2 7.5 6.5])
geoshow('landareas.shp', 'FaceColor', [ .3 .7 .3]);
|