First I put an Axes ax1 with gs1.
For some reason, I want to adjust ax1 with ax1.set_position.
(In the real application only fine adjust)
If I run the script only to this point it works as expected.
Next I put another Axes ax2 with a new GridSpec gs2.
With the command gs2.update() the Axes ax1 will be put back
to the place where it would be without ax1.set_position().
Thanks for reporting this.
I opened a pull request that I believe fixes this problem.
Please test this if you can.
Depending on your need, you may work around this by calling all the
set_position method always after all the GridSpec.update call.
Regards,
-JJ
···
On Sat, Sep 17, 2011 at 1:37 AM, Kurt Mueller <kurt.alfred.mueller@...287...> wrote:
Hi,
In the following script, it seems to me,
that GridSpec does not work as expected.
----------------------------------------
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# adapted from http://matplotlib.sourceforge.net/users/gridspec.html
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
First I put an Axes ax1 with gs1.
For some reason, I want to adjust ax1 with ax1.set_position.
(In the real application only fine adjust)
If I run the script only to this point it works as expected.
Next I put another Axes ax2 with a new GridSpec gs2.
With the command gs2.update() the Axes ax1 will be put back
to the place where it would be without ax1.set_position().
Is this behavior to be explained?
Thanks
--
Kurt Mueller
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options
I did a brief test.
(I added the three "if ax. ..." to the file gridspec.py in the matplotlib library.)
(matplotlib 1.0.1)
As far as I can tell is, that the unexpected effect did not occur any more.
I did not test it with shared axis.
Depending on your need, you may work around this by calling all the
set_position method always after all the GridSpec.update call.
In my programs I will use this approach until we move to a more recent matplotlib version.