Plotting 3d bar garphs using bar3

2 次查看(过去 30 天)
Coo Boo
Coo Boo 2018-11-16
编辑: Coo Boo 2018-11-16
How can I plot three matrices in one 3d bar figure with a legend including 3 items?
I have 3 matrices:
x1=rand(5,10);
x2=rand(5,10);
x3=rand(5*10);
I want to plot them in one 3d bar figure with a legend including 3 items.
Is it possible with bar3 function?
Thanks

回答(1 个)

KALYAN ACHARJYA
KALYAN ACHARJYA 2018-11-16
See all x1,x2,x3 are three different 2d variables, how can you mix all these, how do you distinguish eash other?
You can plot them in three different graphs-
x1=rand(5,10);
x2=rand(5,10);
x3=rand(5,10);
subplot(131),bar3(x1);
subplot(132);bar3(x2),
subplot(133);bar3(x3);
555.png
  1 个评论
Coo Boo
Coo Boo 2018-11-16
编辑:Coo Boo 2018-11-16
Thanks for your response.
But I need to show these three charts in one figure with three grouped bars in each pair of horizontal axes values (x,y). Indeed, I want to compare each value of the matrix x1 with the corresponding values in the matrices x2 and x3.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by