Settling y-axis scaling

ok I think I've found the problem and a possible solution:

The order of the plots should not make a difference. Clearly it does
so this is a bug. Could you try editing matplotlib.axes.Axes.has_data
(on or around line 323 of axes.py) and replace it with

    def has_data(self):
        return (
            len(self._collections) +
            len(self._images) +
            len(self._lines) +
            len(self._patches))>0

and see if this fixes the problem. Ie, with this change, order of
plot commands should not affect the final ylim.

Thanks,
JDH

After making changes to has_data I get the following:

(0.0, 400.0)
(0.0, 400.0)
(0.0, 400.0)

which is not correct it should be:

(300.0, 400.0)
(100.0, 400.0)
(100.0, 400.0)

···

-----Original Message-----
From: matplotlib-users-admin@lists.sourceforge.net
[mailto:matplotlib-users-admin@lists.sourceforge.net]On Behalf Of John
Hunter
Sent: Thursday, July 29, 2004 2:35 PM
To: Vineet Jain
Cc: matplotlib-users
Subject: Re: [Matplotlib-users] Settling y-axis scaling

    > ok I think I've found the problem and a possible solution:

The order of the plots should not make a difference. Clearly it does
so this is a bug. Could you try editing matplotlib.axes.Axes.has_data
(on or around line 323 of axes.py) and replace it with

    def has_data(self):
        return (
            len(self._collections) +
            len(self._images) +
            len(self._lines) +
            len(self._patches))>0

and see if this fixes the problem. Ie, with this change, order of
plot commands should not affect the final ylim.

Thanks,
JDH

-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users