different behaviour of get_xlim in mpl 0.91.4 and mpl-svn 0.98.3

Hello list,

rehashing an old script I recognized I essential difference between mpl 0.91.4
and mpl-svn 0.98.3 $Revision: 6203 $.

In 0.91.4 ax.get_xlim() return a tuple with the current xlimits.
In 0.98.3 ax.get_xlim() return a numpy array with the current xlimits, which
is a reference to the axis limits and therefore changes of this array are
coupled to changes of the xlimits.
- ax.set_xlim() still shows the old behaviour of ax.get_xlim()

I' m not sure this is a bug, but at least it is sometimes dangerous to change
the resulting variable and I didn't expect it, while calling a getter.

I attached a (small) program illustrating the different behaviour of get_xlim.

Thanks in advance for any comments.

regards
Matthias

get_set_xlim_difference.py (1.96 KB)

Yep, this came up the other day. Fixed in svn. get_xlim, get_ylim
now return a tuple

ยทยทยท

On Tue, Oct 21, 2008 at 7:13 AM, Matthias Michler <MatthiasMichler@...361...> wrote:

Hello list,

rehashing an old script I recognized I essential difference between mpl 0.91.4
and mpl-svn 0.98.3 $Revision: 6203 $.

In 0.91.4 ax.get_xlim() return a tuple with the current xlimits.
In 0.98.3 ax.get_xlim() return a numpy array with the current xlimits, which
is a reference to the axis limits and therefore changes of this array are
coupled to changes of the xlimits.
- ax.set_xlim() still shows the old behaviour of ax.get_xlim()