Fix (and it looks like this would need to be fixed in 1.0.1 as well):

A few lines up in draw() (line 183 in axis3d.py) there is a filter for
throwing out grid lines that are outside the axis limits.  In
exceptional cases though, "interval" has a greater number listed first, then
the smaller.  That in and of itself might warrant
further investigation, but simply replacing:

   majorLocs = [loc for loc in majorLocs if \
                interval[0] <= loc <= interval[1]]

with:
        if interval[0] > interval[1]: interval[1],interval[0] =
interval[0],interval[1]
        majorLocs = [loc for loc in majorLocs if \
                interval[0] <= loc <= interval[1]]

seems to solve the problem at hand.

On Sun, Jan 9, 2011 at 4:55 PM, Daniel Hyams <dhy...@gmail.com> wrote:

> Fairly easy to demonstrate; run the code below, and press the right mouse
> button in the middle of the box somewhere,
> and rapidly zoom in/out. It might take a few seconds, but I end up with an
> exception on both Windows and OSX.  If it doesn't
> give you an exception within a few seconds, let go of the right mouse
> button, and zoom more.  I just push the mouse to and fro
> a few times, and it does it for me.
>
>   File "C:\Python26\lib\site-packages\mpl_toolkits\mplot3d\axis3d.py", line
> 233, in draw
>     newval = get_flip_min_max(xyz1[0], newindex, mins, maxs)
> IndexError: list index out of range
>
> I'm working on trying to fix, but I don't know enough about the code to be
> confident that what I do won't break something else.
>
> --------------------------- cut ------------------------------------
>
> from mpl_toolkits.mplot3d import Axes3D
> from matplotlib.ticker import LinearLocator, FixedLocator,
> FormatStrFormatter
> import matplotlib.pyplot as plt
>
> fig = plt.figure()
> ax = fig.gca(projection='3d')
> plt.show()
>
> --
> Daniel Hyams
> dhy...@gmail.com
>



-- 
Daniel Hyams
dhy...@gmail.com
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to