create a 3-D surface plotting from data - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Packages : plots : plots/surfdata

plots[surfdata] - create a 3-D surface plotting from data

Calling Sequence

surfdata(f, opts)

surfdata(g, r1, r2, opts)

Parameters

f

-

three-dimensional Array or list of lists of points

g

-

(optional) two-dimensional Array or list of lists of values

r1, r2

-

(optional) ranges

opts

-

(optional) plotting options

Description

• 

The surfdata command plots a surface from a collection of data points.

• 

In the first calling sequence, f must be a list of list of points, where each point is itself a list of the form x,y,z, or it must be an m by n by 3 Array of datatype float[8], where fi,j,1, fi,j,2, and fi,j,3 represent the x, y, and z values at grid point i,j, for i=1..m and j=1..n.  These forms correspond to those used in the MESH plot structure, as described in plot/structure.

• 

In the second calling sequence, g must be a list of lists of values, [[z11,...,z1n],[z21,...,z2n],...,[zm1,...,zmn]].  In this case, the x-values and y-values are assumed to correspond to those of a uniform grid over the region defined by ranges r1 and r2, and zij is the function value at grid point i,j.  Alternatively, g may be an m by n Array of datatype float[8].  These forms correspond to those used in the GRID plot structure, as described in plot/structure. If g is not provided, then a default Array (having values equal to 0 and using the default grid values) is assumed. If r1 or r2 is not provided, then the range 0..1 is assumed.

• 

The remaining arguments are interpreted as options which are specified as equations of the form option = value. The options can be chosen from the list above or from those described on the plot3d/options help page.

• 

If f or g is a set or list of surfaces, then the surfaces are plotted together.  If a list of lists of lists is given as input to the second calling sequence, then the option plotlist must be specified to distinguish the input from the form allowed in the first calling sequence. The image option does not work with this form of the calling sequence.

• 

If the dimension option is 3, then a 3-D surface is created. If it is 2, then the surface is projected onto a 2-D plot. This option is usually used when one wants to display the coloring of the surface rather than the heights. If no coloring exists, then a default coloring of the surface is applied. You can specify a different coloring with the colorscheme option.

  

The default for the dimension is normally 3. However, if the second calling sequence is used and parameter g is absent but option image is included, then the default is 2.

• 

The image option allows you to use an image file or and image Array created through the ImageTools package. See the ImageTools:-Read help page for a description of the image files allowed. The image is then used for the coloring of the surface to be displayed. The default values for plot options are different when the image option is used; for example, the default dimension is 2 when neither f nor g is provided as a first argument.

Examples

The first calling sequence requires points containing x-, y-, and z- values.

withplots:

cosdata:=seqseqi,j,evalfcosi+j5,i=5..5,j=5..5:

sindata:=seqseqi,j,evalfsini+j5,i=5..5,j=5..5:

surfdatasindata,cosdata,axes=frame,labels=x,y,z

You can assign colors to the surface using a color procedure.

F:=x,y→x2+y2:

surfdatacosdata,color=F

surfdatacosdata,color=F,dimension=2,axes=none

The second calling sequence requires only z-values.

a:=ArrayLinearAlgebra[HilbertMatrix]10,datatype=float8:

surfdataa,1..1,1..1,axes=boxed,labels=x,y,z

The colorscheme option can be used to color the surface by z values.

surfdataa,1..1,1..1,axes=boxed,labels=x,y,z,colorscheme=zgradient,Maroon,Orange,Brown,markers=0.0,0.2,1.0

The image option allows you to display an image as a plot.

fn:=FileTools:-JoinPathkerneloptsdatadir,images,fjords_small.jpg:

surfdataimage=fn

See Also

ImageTools, plot/colorscheme, plot/structure, plot3d/options, plots


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam