How to plot 3D bar graph?
12 ビュー (過去 30 日間)
古いコメントを表示
I've searched but can't find the solution on how to plot the following as a 3D graph. I have a matrix of x,y,z values, e.g.:
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226450/Capture.jpeg)
I want to generate a 3D plot in all 3 dimensions, with y as the height of the bar and z as the width, such as the following (not drawn to scale...I just kluged it together in powerpoint):
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226451/Capture.jpeg)
How do I do this? none of the following worked:
bar3(x,y,z)
bar3(z)
bar3(x,y)
bar3(y,z)
0 件のコメント
回答 (2 件)
KALYAN ACHARJYA
2019 年 6 月 26 日
編集済み: KALYAN ACHARJYA
2019 年 6 月 26 日
scatterbar3(x,y,z,0.5)
grid on
For example
x=1:10;
y=2:2:20;
z=3:3:30;
scatterbar3(x,y,z,0.5)
grid on
![99.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226454/99.png)
参考
カテゴリ
Help Center および File Exchange で Bar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!