mplot3d "set_zlim" x "set_zlim3d" ?

Hi,

     In MatPlotLib 1.0.0 the example 'mplot3d/surface3d_demo.py' has the line :
ax.set_zlim3d(-1.01, 1.01)
while the same file in MatPlotLib 1.1.0 has :
ax.set_zlim(-1.01, 1.01)

     If I try to use ax.set_zlim(-1.01, 1.01) with MatPlotLib 1.0.0 I get :
"$ python surface3d_demo.py
Traceback (most recent call last):
   File "surface3d_demo.py", line 16, in <module>
     ax.set_zlim(-1.01, 1.01)
AttributeError: 'Axes3DSubplot' object has no attribute 'set_zlim'"

    So what is the recommended way for maximum compatibility (1.0.0/1.1.0) ? Use 'set_zlim' or 'set_zlim3d ?

         Thanks in advance,

         Roberto

What is recommended is to upgrade to v1.1.0 where the behavior is much more intuitive and follows expected conventions. If that is not possible, then use set_*lim3d().

Ben Root

···

On Sunday, November 27, 2011, Roberto Colistete Jr. <roberto.colistete@…149…> wrote:

Hi,

In MatPlotLib 1.0.0 the example 'mplot3d/surface3d_demo.py' has the

line :
ax.set_zlim3d(-1.01, 1.01)
while the same file in MatPlotLib 1.1.0 has :
ax.set_zlim(-1.01, 1.01)

If I try to use ax.set_zlim(-1.01, 1.01) with MatPlotLib 1.0.0 I get :

“$ python surface3d_demo.py
Traceback (most recent call last):
File “surface3d_demo.py”, line 16, in
ax.set_zlim(-1.01, 1.01)
AttributeError: ‘Axes3DSubplot’ object has no attribute ‘set_zlim’”

So what is the recommended way for maximum compatibility
(1.0.0/1.1.0) ? Use ‘set_zlim’ or 'set_zlim3d ?

    Thanks in advance,

    Roberto