Wrong call to ax.set_ylim3d in example simple_3danim.py

Hi:

When I run the simple_3danim.py example
(http://matplotlib.org/examples/animation/simple_3danim.html) I get
the following error:

  File "simple_3danim.py", line 47, in <module>
    ax.set_xlim3d([0.0, 1.0])
  File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/mpl_toolkits/mplot3d/axes3d.py",
line 571, in set_xlim3d
    if right is None and iterable(left):
NameError: global name 'iterable' is not defined

I can fix this by replacing `ax.set_xlim3d([0.0, 1.0])` by
`ax.set_xlim3d(0.0, 1.0)` (and similarly for the `ax.set_ylim3d` and
`ax.set_zlim3d`).

I'm running mpl ver. 1.3.

If this is a bug, I can send a PR.

Alejandro.

Alejandro,

Yes, it is a bug, but in axes3d, not the example (both calls should be legit). A PR has already been submitted to the 1.2.x branch and will be merged to master soon.

Ben Root

···

On Tuesday, January 1, 2013, Alejandro Weinstein wrote:

Hi:

When I run the simple_3danim.py example

(http://matplotlib.org/examples/animation/simple_3danim.html) I get

the following error:

File “simple_3danim.py”, line 47, in

ax.set_xlim3d([0.0, 1.0])

File “/usr/local/lib/python2.7/dist-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/mpl_toolkits/mplot3d/axes3d.py”,

line 571, in set_xlim3d

if right is None and iterable(left):

NameError: global name ‘iterable’ is not defined

I can fix this by replacing ax.set_xlim3d([0.0, 1.0]) by

ax.set_xlim3d(0.0, 1.0) (and similarly for the ax.set_ylim3d and

ax.set_zlim3d).

I’m running mpl ver. 1.3.

If this is a bug, I can send a PR.

Alejandro.