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:
Is it possible to merge docked figures?

Subject: Is it possible to merge docked figures?

From: Wouter Numan

Date: 18 Sep, 2009 22:04:04

Message: 1 of 6

I have created two separate figures and want to merge them into a single figure that can be exported for use in a report. Is it possible to dock the two figures, for instance to a top and bottom tile, and merge them into a single figure with the old figures acting as subplots?

Alternatively, is it possible to plot existing figures in a subplot?
 

Subject: Is it possible to merge docked figures?

From: Dave Brackett

Date: 20 Sep, 2009 21:38:04

Message: 2 of 6

"Wouter Numan" <ktjukker@hotmail.com> wrote in message <h9104k$ald$1@fred.mathworks.com>...
> I have created two separate figures and want to merge them into a single figure that can be exported for use in a report. Is it possible to dock the two figures, for instance to a top and bottom tile, and merge them into a single figure with the old figures acting as subplots?
>
> Alternatively, is it possible to plot existing figures in a subplot?
>

i don't think there is a way to do this that is as straightforward as you want. the only way i can think of is to extract the data from your existing plots using 'get' for the xdata and ydata. Then replot into a single axes or into separate subplots within a single figure.

Subject: Is it possible to merge docked figures?

From: Phil Goddard

Date: 20 Sep, 2009 22:26:03

Message: 3 of 6


There is most likely a way to dock and arrange multiple figures using undocumented java functionality, but I suspect you don't really need to do that.

You'd be better off either
a) creating a 3rd figure and changing the parent property of our 2 axes to be that figure.
You'll most likely need to play around with their position property once you've done that.
b) a similar thing: change the position of the axes on one of your figure (to make it smaller) and then copy the axes from the second figure onto it.

You may find that
>> doc copyobj
is useful to read.

Phil.

Subject: Is it possible to merge docked figures?

From: Rune Allnor

Date: 21 Sep, 2009 07:38:59

Message: 4 of 6

On 19 Sep, 00:04, "Wouter Numan" <ktjuk...@hotmail.com> wrote:
> I have created two separate figures and want to merge them into a single figure that can be exported for use in a report. Is it possible to dock the two figures, for instance to a top and bottom tile, and merge them into a single figure with the old figures acting as subplots?
>
> Alternatively, is it possible to plot existing figures in a subplot?

The way to handle such questions is to avoid the GUI when
making figures.

Instead, make scripts or functions that plot your figures.
That way, it takes no time to edit or reproduce a figure
(I can reproduce stuff I made 15 years ago this way), and
'tiny' modifications like the one you ask for, is fast and
easy to achieve.

Yes, I know. You already have the figures and they weren't
made with scripts. But use the script method in the future.
You will be far better off.

Rune

Subject: Is it possible to merge docked figures?

From: Jan Simon

Date: 21 Sep, 2009 07:59:03

Message: 5 of 6

Dear Wouter Numan!

> I have created two separate figures and want to merge them into a single figure that can be exported for use in a report. Is it possible to dock the two figures, for instance to a top and bottom tile, and merge them into a single figure with the old figures acting as subplots?
>
> Alternatively, is it possible to plot existing figures in a subplot?

If you need this once only, it could be theeasies way to export the 2 figures to EPS files and print them with a PDF printer on one page.
If you need it repeatedly, other solution might be faster.

Kind regards, Jan

Subject: Is it possible to merge docked figures?

From: Biju Edamana

Date: 30 Oct, 2009 19:20:03

Message: 6 of 6

"Wouter Numan" <ktjukker@hotmail.com> wrote in message <h9104k$ald$1@fred.mathworks.com>...
> I have created two separate figures and want to merge them into a single figure that can be exported for use in a report. Is it possible to dock the two figures, for instance to a top and bottom tile, and merge them into a single figure with the old figures acting as subplots?
>
> Alternatively, is it possible to plot existing figures in a subplot?
>

Go to view in the figure toolbar. Open the tab figure palette. There is this option new subplots. click on the 2-D or 3-D axes depending on your requirement. This will create a new subplot below your current figure. Then copy and paste the plot you want into this new plot are.

Tags for 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