Probable Bug in Axes.margins()

Hi again,
While looking for a solution for my autoscale issue (see 13/7/2010 16:50) I had a look at the matplotlib (1.0.0) source code and found something strange in axes.py

In the Axes class the method margins()(Line 1651) the doc string says that using margins() with no arguments should return xmargin, ymargin.

If I look at the code for that situation
--- axes.py line (1686-1687)
         if not args and not kw:
             return self._ymargin, self._ymargin

···

-----
the ymargin is returned twice.

I suppose that this is a bug and should be

   return self._xmargin, self._ymargin

Best regards

Georges Schutz

Hi again,
While looking for a solution for my autoscale issue (see 13/7/2010
16:50) I had a look at the matplotlib (1.0.0) source code and found
something strange in axes.py

In the Axes class the method margins()(Line 1651) the doc string says
that using margins() with no arguments should return xmargin, ymargin.

If I look at the code for that situation
--- axes.py line (1686-1687)
          if not args and not kw:
              return self._ymargin, self._ymargin
-----
the ymargin is returned twice.

I suppose that this is a bug and should be

    return self._xmargin, self._ymargin

Thank you. Fixed in 8549, 8550.

Eric

···

On 07/14/2010 01:29 AM, Georges Schutz wrote:

Best regards

Georges Schutz

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options