plot - In Matlab: When plotting in 3d, using colormap(..), how to specify 'transparent' (white?) color for the value 'zero'? -
in matlab:
when plotting in 3d following:
xxxxx=normrnd(1,1,[1,10000]); yyyyy=normrnd(1,1,[1,10000]); minx=min(xxxxx); maxx=max(xxxxx); miny=min(yyyyy); maxy=max(yyyyy); x = minx:(maxx-minx)/10:maxx; y = miny:(maxy-miny)/10:maxy; [x,y] = meshgrid(x,y); hist3 = hist3([xxxxx' ,yyyyy'],{x y}); figure(); surf(x,y,hist3); colormap(jet); shading interp;
is possible specify 'transparent' (white?) color surface @ 'zero' (instead of dark blue, seen if plot code above)?
thanks on advance!
instead of use "jet" built-in colormap, can define custom colormap first value white (1.0 1.0 1.0 in rgb think) in matlab page. example wrote is
map = [0.2, 0.1, 0.5 % fisrt color 0.1, 0.5, 0.8 0.2, 0.7, 0.6 0.8, 0.7, 0.3 0.9, 1, 0]; % last color
in each line rgb color. every value 0.0 , 1.0 , not 0 255.
Comments
Post a Comment