Plot a 3-D bar graph and coloring

6 ビュー (過去 30 日間)
Elria
Elria 2013 年 1 月 25 日
X=[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000];
Y=[0;50;100;150;200;250;300;350;400];
% Create the colour vectors
map=[1 0 0; 1 1 0;0 1 0];
colormap(map);
colors=zeros(size(Z));
% Define the thresholds
colors(Z<90)=3;
colors(Z >=90 & Z < 95)=2;
colors(Z >= 95)=1;
% Plot the 3D surface
surf(X,Y,Z,colors)
How can I do the same thing but get a 3-D bar grap?I have never plotted again a 3-D bar graph in matlab, only excel. Thanks in advance.

回答 (1 件)

Thorsten
Thorsten 2013 年 1 月 25 日
  2 件のコメント
Elria
Elria 2013 年 1 月 25 日
I've read that but still cannot get it.
Thorsten
Thorsten 2013 年 2 月 8 日
編集済み: Thorsten 2013 年 2 月 8 日
What is Z in your example?
For a first approach, try
bar3(Z)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeBar Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by