필터 지우기
필터 지우기

Subplot spacing

조회 수: 4 (최근 30일)
Aadil
Aadil 2012년 4월 23일
댓글: Johann 2023년 2월 9일
Following on from my last question, Does anyone know how to decrease the spacing between multiple subplots?
I have tried removing Xlabels but it doesn't seem to make any difference
Thanks

채택된 답변

Daniel Shub
Daniel Shub 2012년 4월 23일
From an enhancement request I put in to TMW 2 years ago: "I think that subplot puts too much space between the axes as well as between the axes and the edge of the figure. I would like to be able to control this. Looking at the code of subplot.m the spacing seems to depend on a field of the application data called SubplotDefaultAxesLocation and the hard coded values for inset on line 130. I believe if the hard coded inset was changed to a field of the application data, then a user could modify the spacing between subplots. Further, the defaults for both properties should become modifiable with something like set(0, 'DefaultAxesSubplot..."
As an immediate workaround you should be able to copy subplot.m to mysubplot.m and change the line which sets the variable "inset" to a value that you like and then change the DefaultAxesPosition globally
set(0, 'DefaultAxesPosition', ...
or locally
set(gcf, 'DefaultAxesPosition', ...
  댓글 수: 3
Daniel Shub
Daniel Shub 2012년 4월 23일
You need to copy subplot.m to mysubplot.m and then modify line 130 (or so) of mysubplot.m. The line you need to modify is where the inset variable is set.
Johann
Johann 2023년 2월 9일
Any example?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by