Adjust the axis of bar3 plot
29 ビュー (過去 30 日間)
古いコメントを表示
Hi,
if I plot bar3(myMatrix) I got the result in the attached picture.
MyMatrix size is 70x15.
1.) How can make the y-axis (1:15) more broader, by keeping the other axis as it is. I think "daspect" is not appropriate.
2) Is ist possible to change y-axis to e.g. 30:45?
Thank you.
0 件のコメント
採用された回答
Adam Danz
2023 年 4 月 5 日
Use this syntax to specify y-coordinates: bar3(y,z)
z = rand(4,20);
y = [30 35 40 50];
bar3(y,z)
ylabel('y axis')
2 件のコメント
その他の回答 (2 件)
Samyuktha
2023 年 4 月 5 日
Hi CSCh,
I understand that you want to change the width and y-axis of the plot obtained from 'bar3' command.
You can change the width of the bars by changing the 'width' input argument. By default, width property is set to 0.8 and the bars have a slight separation.
You can change the labels of the axis by using the 'xticklabel', 'yticklabel' and 'zticklabel' properties of the bar3 plot.
Please refer to the following documentation link for more information:
Hope this helps!!
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!