Increase width of x axis

조회 수: 62 (최근 30일)
ABCDEFG HIJKLMN
ABCDEFG HIJKLMN 2022년 2월 22일
답변: ABCDEFG HIJKLMN 2022년 2월 22일
I want to increase the width of the x axis of a plot.
Changing set(gcf, 'Position', [100, 100, 650, 650]) just increases the size of the window of the figure, not the plot's width. I do not want to change the height, just the width.
How can I do this?
Thank you in advance!
  댓글 수: 2
KSSV
KSSV 2022년 2월 22일
set(gca,'linewidth',6)
ABCDEFG HIJKLMN
ABCDEFG HIJKLMN 2022년 2월 22일
This increases the thickness of the lines, I just want to increase the length of the axis.

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

채택된 답변

ABCDEFG HIJKLMN
ABCDEFG HIJKLMN 2022년 2월 22일
I have figured it out, I had to add set(gca,'FontSize',12,'DataAspectRatio',[1 1.75 1]) for it to work.
Thank you for the help.

추가 답변 (1개)

Ive J
Ive J 2022년 2월 22일
You need to set gca and not gcf:
set(gca, 'Position', ...)
  댓글 수: 1
ABCDEFG HIJKLMN
ABCDEFG HIJKLMN 2022년 2월 22일
Hello, thank you for your answer. I tried setting this, but the figure just comes out completely blank. What could be causing this? I assured that the size of the axes was smaller than the size of the figure...

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by