3D bar plot, does not show solid bars
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Walter Roberson
el 29 de Abr. de 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 comentarios
Walter Roberson
el 30 de Abr. de 2025
https://www.mathworks.com/matlabcentral/answers/2176730-3d-bar-plot-does-not-show-solid-bars#comment_3332736 clearly shows negative "error"
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


