Setting alpha of colorbar in MATLAB R2014b -
i have colorplot (from imagesc) alpha map. i'd colorbar reflect alpha (notice in image below colormaps same). found solutions online none seem work in r2014b.
code here:
subplot(2,1,1) = imagesc(meshgrid(0:10,0:5)); alpha(a,1) colorbar subplot(2,1,2) b = imagesc(meshgrid(0:10,0:5)); alpha(b,.7) colorbar 
james
in pre-r2014b matlab, colorbar axis containing image can set alpha:
hb = findobj(gcf,'type','axes','tag','colorbar'); hi = findobj(hb,'type','image'); alpha(hi,0.7) instead of gcf, use handles of individual subplots.
or save handle when make it:
hb = colorbar; from r2014b on, colorbar creating using new handle graphics system, there no longer child image modify. colorbar created internally colorbarhgusingmatlabclasses, obfuscated .p file, it's no clear how it's constructed.
Comments
Post a Comment