Increase width of x axis

43 次查看(过去 30 天)
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 个评论
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