I\'ve got a 2-D histogram (the plot is 3D - several histograms graphed side by side) that I\'ve generated with the bar3 plot command. However, all the zero values show up
My problem was not zero values, but NaN values (which are converted into zero values inside of bar3). I wanted to keep displaying elements with values zero, but not the elements with value nan. I adjusted the code slightly, and it worked perfectly:
for i = 1:numel(h)
index = logical(kron(isnan(z(:,i)),ones(6,1)));
zData = get(h(i),'ZData');
zData(index,:) = nan;
set(h(i),'ZData',zData);
end
Thanks!