3D effect on bar diagram

조회 수: 2 (최근 30일)
Giuseppe
Giuseppe 2020년 3월 25일
댓글: darova 2020년 3월 26일
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.

답변 (1개)

darova
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
Giuseppe
Giuseppe 2020년 3월 26일
P.s. How can I delete numbers on x axis (i.e. -0.5 0 0.5 1 1.5 2 2.5)?
darova
darova 2020년 3월 26일
axis off
% or
get(gca,'xticklabel',[])

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by