[SciPy-Dev] OT: bug in matplotlib for py32

josef.pktd at gmail.com josef.pktd at gmail.com
Sun Apr 10 13:18:42 EDT 2011


On Sun, Apr 10, 2011 at 8:38 AM,  <josef.pktd at gmail.com> wrote:
> I'm going through py23 conversion for statsmodels, using Goehlke's matplotlib
>
> we have a function that uses squeeze=False, and get an exception
>
> in pyplot.py
>
> def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
>                subplot_kw=None, **fig_kw):
>
> doesn't have a ret defined,
> no return value
>
> (Sorry for OT, I'm not setup for reporting matplotlib bugs)

adding the else part in

    if squeeze:
        # Reshape the array to have the final desired dimension (nrow,ncol),
        # though discarding unneeded dimensions that equal 1.  If we only have
        # one subplot, just return it instead of a 1-element array.
        if nplots==1:
            ret = fig, axarr[0,0]
        else:
            ret = fig, axarr.squeeze()
    else:
        ret = fig, axarr

fixes it for our test suite, but I don't know whether it is correct

Josef
>
> Josef
>



More information about the SciPy-Dev mailing list