arangement / merge of multiple figures /list of figures

Dear usegroup,
for the generation of measurement reports I look for a possibility to merge multiple plots to one.
My plan (not the best one I think…):

I generate a figure in an external functions and receive a list of figures like

def make_one_fig():
thisfig = figure() …
plot (…)
return thisfig

onefig = make_one_fig()
figurelist.append(onefig)

merge_figurelist_to_one_plot(figurelist)

show()

This does not work and I believe my strategy is bad. Has anybody an idea, how to merge a list of figures to one plot?
Thanks a lot,
Dirk

Dear Mr. Zickermann,

Look for a thread titled ‘subplots from existing figures’ (5th March) or something similar. I posted a function there that takes in a list of figures and spits out a new one containing those. There is still a bug in it though. For some reason copying axes from one figure to another seems to be broken. ie. the axes can’t be resized properly after being copied.

I’m still waiting for a developer to comment on that. I don’t know if my function is doing the copying wrong or if there is some other underlying error.

Regards,
cputter

···

On 12/03/2008, Dirk Zickermann <dirk.zickermann@…982…> wrote:

Dear usegroup,
for the generation of measurement reports I look for a possibility to merge multiple plots to one.
My plan (not the best one I think…):

I generate a figure in an external functions and receive a list of figures like

def make_one_fig():
thisfig = figure() …
plot (…)
return thisfig

onefig = make_one_fig()
figurelist.append(onefig)

merge_figurelist_to_one_plot(figurelist)

show()

This does not work and I believe my strategy is bad. Has anybody an idea, how to merge a list of figures to one plot?
Thanks a lot,
Dirk


This SF.net email is sponsored by: Microsoft

Defy all challenges. Microsoft(R) Visual Studio 2008.

http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I had tried a similar thing, only less general (I only had two plots
to add to the same figure). I hit the same problem - the axes wouldn't
resize when the window was resized, and also some of my axes tick
labels were lost (oddly the first xticklabel was there but the others
were missing).

I found a way round it by getting the individual plotting functions to
accept an optional axes argument that they plot to...

def make_one_fig(ax=None):
    fig = None
    if ax is None:
        fig = figure() ...
        ax = fig.add_subplot(111)
    ax.plot (..)
    return fig

Then if called without ax set this plots as before, but if you want to
build up a set of plots:
fig = figure()
ax = fig.subplot(211)
make_one_plot(ax=ax)
etc

Robin

···

On Wed, Mar 12, 2008 at 7:37 PM, Christiaan Putter <ceputter@...982...> wrote:

Look for a thread titled 'subplots from existing figures' (5th March) or
something similar. I posted a function there that takes in a list of
figures and spits out a new one containing those. There is still a bug in
it though. For some reason copying axes from one figure to another seems to
be broken. ie. the axes can't be resized properly after being copied.