This is an archival dump of old wiki content --- see scipy.org for current material

Attachment 'mat3d_ex2.py'

Download

   1 #!/usr/bin/env python
   2 """Simple example for showing mat3d.plot3 functionality
   3    Variables that can be set in mat3d.plot3 :
   4    colors = Colors   - Sets the colormap
   5    linewidth = 0.1   - Sets the width of the plotlines
   6    precision=3       - Sets the number of digits accuracy for the text on the axis    
   7    num_ticks=5       - Number of ticks on axes, evenly spaced """
   8 
   9 import numpy as N
  10 import mat3d as M
  11 
  12 x0,x1,npts_x = -1.0,1.1,11 
  13 y0,y1,npts_y = -1.0,1.1,11 
  14 
  15 X,Y = N.mgrid[x0:x1:0.1,y0:y1:0.1]
  16 Z = X * N.exp(-X**2 - Y**2)
  17 
  18 M.plot3(X,Y,Z,linewidth =2.0)

New Attachment

File to upload
Rename to
Overwrite existing attachment of same name

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.