3d plot examples

Hi,

With that change, the demos both work for me.

I 've to change line 736 in mplot3d.py too but then it works...

Line 736:

- if z:
+ if z is None: --> correct or not?

"python surface.py" makes a nice surface plot.

No, for me it looks rather strange...

Thanks

Jens

3dproj.png

surface.png

Your logic is backwards, I think. This is what I think is correct:

     def auto_scale_xyz(self, X,Y,Z=None,had_data=None):
         x,y,z = X,Y,Z
         try:
             x,y = X.flat,Y.flat
             if Z is not None:
                 z = Z.flat
         except AttributeError:
             pass

         self.xy_dataLim.update_numerix(x, y, not had_data)
         if z is not None:
             self.zz_dataLim.update_numerix(z, z, not had_data)
         self.autoscale_view()

The PNG I get from python surface.py is attached.

Cheers,

-- Paul

surface.png

···

On Feb 15, 2006, at 10:42 AM, J.Brandenburg@...909... wrote:

I 've to change line 736 in mplot3d.py too but then it works...

Line 736:

- if z:
+ if z is None: --> correct or not?

--
Dr. Paul S. Ray E-mail: Paul.Ray@...706...
Naval Research Laboratory WWW : http://xweb.nrl.navy.mil/personnel/paulr/
Code 7655 Phone : (202) 404-1619
Washington, DC 20375 AIM : NRLPSR