3D bar plot, does not show solid bars
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i am using bar3 to do the 3D bar plots
when I use log scale for the z axis, only the top face of the 3D bar (say cuboid) shows, the rest of the bar is invisible,
figure;
bar3(err_data(:,:,2))
set(gca,'ZScale', 'log');

this does not happen on removing log scale
figure;
bar3(err_data(:,:,2))

0 Commenti
Risposte (2)
Walter Roberson
il 29 Apr 2025
You have negative z data. When you set(gca,'ZScale', 'log') then any shape that has a vertex with negative Z cannot be rendered. Remeber that the log() of negative data is pi*1i plus log(-1*data) and renderers cannot handle the imaginary component of the resulting vertices.
3 Commenti
Walter Roberson
il 30 Apr 2025
https://www.mathworks.com/matlabcentral/answers/2176730-3d-bar-plot-does-not-show-solid-bars#comment_3332736 clearly shows negative "error"
Vedere anche
Categorie
Scopri di più su Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!