How I obtain with function bar3 different sizes for each bar in MATLAB?
Mostra commenti meno recenti
Hi all,
I'm writing to inquire about the doubt that I have written for the title of the question:
%----------------------------
values = [1.0 0.6 0.1; 0.0 1.0 0.3; 0.9 0.4 1.0];
h = bar3(values);
shading interp
for i = 1:length(h)
% Get the ZData matrix of the current group
zdata = get(h(i),'Zdata');
set(h(i),'Cdata',zdata)
end
set(h,'EdgeColor','k')
view(-61, 68);
colormap cool
colorbar
%----------------------------
I want to obtain different sizes for each bar that the sizes are function of variable "values". My aim is also to vary the size of each bar according to the Z value, which is between 0 and 1. When I say "size" I mean the X and Y dimensions of the square, the area of the bar in a top view
Thank you very much, José Manuel
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Title in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!