How to change plot size?

조회 수: 10 (최근 30일)
Karel Drenth
Karel Drenth 2017년 1월 9일
댓글: Karel Drenth 2017년 1월 9일
Greetings,
I'm using a custom toolbox to generate a certain figure. The resulting image looks fine, except for the fact that the x-axis is hidden. Looking at the property editor I can verify it exits (stating 'R(m)'), has ticks and has the colour black. Unfortunately, it is just outside of the window (see image).
I tried increasing the window size, but to no avail, the image changes with the window size. Ideally I would like add some code that would reduce the area used for plotting (thus leaving some room to actually show the x-axis). Does anyone know if this is possible? Or if there is an earlier answered question that solves this?
Kind regards,
Karel
Image:

채택된 답변

Image Analyst
Image Analyst 2017년 1월 9일
Use the position property
set(gcf, 'units', 'normalized');
set(gcf, 'Position', [0, 0.1, 1, 0.9]);
  댓글 수: 1
Karel Drenth
Karel Drenth 2017년 1월 9일
Thanks for the quick reply, works as intended!

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

추가 답변 (2개)

Image Analyst
Image Analyst 2017년 1월 9일
Try Yair's attached MaximizeFigureWindow function.

Steven Lord
Steven Lord 2017년 1월 9일
Set the OuterPosition property of your axes. That page has a link to an example, "Axes Resize to Accommodate Titles and Labels", that may be of use to you.

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by