More than one subplot fails when embedding in Tk

I have made great progress with my GUI to plot

    > time-series files from my unsteady-flow modeling
    > software. It works when I have one subplot per figure
    > but I have not been able to get two subplots (211 and
    > 212) to work. Only the lower subplot appears and the
    > trace or line assigned to the upper subplot (211) appears
    > in the lower subplot. The space for the upper subplot
    > appears as blank space in the figure.

You code looks correct on first glance (except did you mean tht title
to be in the loop?) . My guess is your data structure has a bug in
it. Add a print statement and make sure the loc code is as you think
it is.

        print fg.fgs[ifg].sp[isp].loc_code
        ax = f.add_subplot(fg.fgs[ifg].sp[isp].loc_code)

If they are correct, you need to compose a minimum, free standing
script that replicates your problem and I can take a look.

Hope this helps,
JDH

John,

Thanks for the tip. I had thought of checking that as well as I
drifted off to sleep. That was it-in spades. I had
input two different subplot codes but somehow only one got saved.
Then I got suckered in by the simplicity of initializing
the list using [ 2*Subpdata() ] where Subpdata is a class
defining the various attributes of a subplot in my program.
However, I soon found out that this made my problem worse;
Python went into an endless loop. Again, this gave me two
subplot codes but they were the same. The simple list
initialization binds the same instance object to the two
list entries. Not what I wanted. After using a for statement
to initialize, I got my two subplots.

I am now able to create multiple figures, each with one or more
subplots with my software. What a great collection of software.
Thanks for all the work.

I tried using mx.datetime to create an mx.datetime instance
which worked fine. However, mx2num() fails with python
claiming an undefined mxdates. I checked the source and
found only one mxdates. No idea how it should be defined.
In the mean time I am using a datetime instance but I lose
a small bit of precision with only integer seconds.

                            Delbert

···

On Tuesday 01 February 2005 05:38 am, John Hunter wrote:

    > I have made great progress with my GUI to plot
    > time-series files from my unsteady-flow modeling
    > software. It works when I have one subplot per figure
    > but I have not been able to get two subplots (211 and
    > 212) to work. Only the lower subplot appears and the
    > trace or line assigned to the upper subplot (211) appears
    > in the lower subplot. The space for the upper subplot
    > appears as blank space in the figure.

You code looks correct on first glance (except did you mean tht title
to be in the loop?) . My guess is your data structure has a bug in
it. Add a print statement and make sure the loc code is as you think
it is.

        print fg.fgs[ifg].sp[isp].loc_code
        ax = f.add_subplot(fg.fgs[ifg].sp[isp].loc_code)

If they are correct, you need to compose a minimum, free standing
script that replicates your problem and I can take a look.

Hope this helps,
JDH