How to fix the colorbar in bar3

1 次查看(过去 30 天)
Anna
Anna 2012-5-4
Dear all, I would like to plot a bar3 graph. In order to plot bars as functions of their height, I have found the following code:
shading interp
% For each barseries, map its CData to its ZData
for j = 1:length(h)
zdata = get(h(j),'ZData');
set(h(j),'CData',zdata)
% Add back edge color removed by interpolating shading
set(h,'EdgeColor','k')
end
colorbar
My problem is that, during my dynamics, the colorbar changes in time. How can I fix it?
Thanks a lot.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Colorbar 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by