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.

 채택된 답변

Adam Danz
Adam Danz 2023년 4월 5일

0 개 추천

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

CSCh
CSCh 2023년 4월 6일
Thanks that works.
Dyuman Joshi
Dyuman Joshi 2023년 4월 7일
If this answer solved your problem, please consider accepting it.

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

추가 답변 (2개)

Samyuktha
Samyuktha 2023년 4월 5일

0 개 추천

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!!

댓글 수: 1

CSCh
CSCh 2023년 4월 5일
Thank you for you help,
if ich change the wdth, this does not broaden the axis. See the image (right width=5, left 0.8). i just want to pull it apart a little bit.)

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

Alon Slapak
Alon Slapak 2023년 9월 30일

0 개 추천

ax = gca;
ax.PlotBoxAspectRatio = [1 0.5 1];

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

릴리스

R2022b

태그

질문:

2023년 4월 5일

댓글:

2023년 9월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by