3D effect on bar diagram
2 次查看(过去 30 天)
显示 更早的评论
Is it possible to obtain the 3D effect on bar diagram as shown in the following figure (obtained by Microsoft Excel)?
P.s. I've to plot some scalar quantities.
0 个评论
回答(1 个)
darova
2020-3-26
YOu can manually plot boxes
[X,Y] = meshgrid([0 0 1 1 0]-1/2,[0 0 1 1]-1/2);
Z = zeros(size(X));
Z([6 7 10 11]) = 1;
surf(X,Y,3*Z,'facecolor','r')
hold on
surf(X+1,Y,2*Z,'facecolor','b')
surf(X+2,Y,1*Z,'facecolor','g')
hold off
axis equal
4 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!