Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to increase vertical spacing between subplots?

Subject: How to increase vertical spacing between subplots?

From: Jim O'connor

Date: 30 Dec, 1997 18:45:02

Message: 1 of 5

 I need to increase the vertical spacing because the title of one plot
overwrites the xlabel of the plot above it in my 7 rows x 2 columns
figure.

I assume there's an object property that needs to be modified, but I
can't find it.

Any help would be appreciated - thanks in advance.


--
Jim

Subject: How to increase vertical spacing between subplots?

From: Matthias Ehrhardt

Date: 31 Dec, 1997 16:18:22

Message: 2 of 5

Jim O'connor wrote:
>
> I need to increase the vertical spacing because the title of one plot
> overwrites the xlabel of the plot above it in my 7 rows x 2 columns
> figure.
>
> I assume there's an object property that needs to be modified, but I
> can't find it.
>
> Any help would be appreciated - thanks in advance.
>
> --
> Jim
have you tried:

orient tall

(and then printing the figure)

?

Matthias

Subject: How to increase vertical spacing between subplots?

From: Larry Ricker

Date: 31 Dec, 1997 10:25:26

Message: 3 of 5

Jim O'connor wrote:
>
> I need to increase the vertical spacing because the title of one plot
> overwrites the xlabel of the plot above it in my 7 rows x 2 columns
> figure.
>
> I assume there's an object property that needs to be modified, but I
> can't find it.
>
> Any help would be appreciated - thanks in advance.
>
> --
> Jim

My experience is that the problem is caused by the subplot default to
normalized coordinates. That's fine when the figure window is large
relative to the number of subplots, but works poorly otherwise (because
the fonts don't scale). The same problem occurs if you start with a 2x2
subplot in a normal figure window, then resize it to be small (try it
and see what happens).

To get around this you can specify the sizes and positions of the axes
yourself, leaving enough space for the titles and labels. It's not
difficult (as long as you are well versed in handle graphics), but
probably not worth the trouble unless you plan to use the same plot
format repeatedly.

Larry

Subject: How to increase vertical spacing between subplots?

From: Jim O'connor

Date: 31 Dec, 1997 15:50:51

Message: 4 of 5


I ended up copying the toolbox version of subplot.m to
~/matlab/bin/subplot2.m, then changed the variable PERC_OFFSET_B in
subplot2.m from

PERC_OFFSET_B = PERC_OFFSET_L % = 2*0.09
to
PERC_OFFSET_B = 2*0.15;

which fixed the problem. It's a quick-fix kludge, not a general
solution, but it works.



Jim O'connor <joconnor@ftw.mot.com> writes:

> I need to increase the vertical spacing because the title of one plot
> overwrites the xlabel of the plot above it in my 7 rows x 2 columns
> figure.
>
> I assume there's an object property that needs to be modified, but I
> can't find it.
>
> Any help would be appreciated - thanks in advance.
>
>
> --
> Jim

--
Jim

Subject: How to increase vertical spacing between subplots?

From: Klemens

Date: 23 Jun, 2014 13:41:08

Message: 5 of 5

Jim O'connor <joconnor@fwhre13.fwrdc.rtsg.mot.com> wrote in message <s81oh1ymjch.fsf@fwhre13.fwrdc.rtsg.mot.com>...
> I need to increase the vertical spacing because the title of one plot
> overwrites the xlabel of the plot above it in my 7 rows x 2 columns
> figure.
>
> I assume there's an object property that needs to be modified, but I
> can't find it.
>
> Any help would be appreciated - thanks in advance.
>
>
> --
> Jim


>> help subplotspace
 SUBPLOTSPACE Spread subplots out.
    SUBPLOTSPACE increases horizontal spacing between subplots
    by 1%.
    SUBPLOTSPACE(DIRECTION) increases spacing between subplots
    by 1% where DIRECTION is either 'vertical' or 'horizontal'.
    SUBPLOTSPACE(DIRECTION,N) increases spacing between subplots
    by N%. If N is negative then the space is reduced.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us