display a list of plot structures - Maple Help

Online Help

All Products    Maple    MapleSim


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

plots[display] - display a list of plot structures

Calling Sequence

display(P)

Parameters

P

-

a set, list or Array (one- or two-dimensional) of plot structures, or an animation structure

Description

• 

If P is an Array of plot structures, then a row or table of plots is displayed. P can contain a combination of 2-D and 3-D plots, including animations. This feature is described in more detail on the plot/arrayplot help page. The insequence and overrideoption options are not applicable in this case.

• 

If P is an animation structure created by the plots:-animate command, then the frames are displayed in a tabular format, unless the insequence option is set to true, in which case the frames are displayed in sequence in an animation. The overrideoption option is not applicable in this case.

• 

If P is a list or set of plot structures (created by any plotting command), the display command combines these structures into a single plot. If the insequence option is set to true, then an animation is created instead; the order of the plots is preserved only if P is a list. All elements in P must have the same dimension, as 2-D and 3-D plots cannot be combined except in the case where P is an Array as described above.

• 

In situations where multiple plots are combined into a single plot, the display command attempts to merge options specified within the individual plot structures. If a conflict arises, such as different titles for two plots, an arbitrary choice is made.

• 

Additional options as described in the plot/option and plot3d/option help pages may be provided if they are applicable. If the option is one that applies to the entire plot, such as the title or axes style, then the new option overrides any previously specified in the plots contained in P. However, options such as color or linestyle that apply to individual elements like curves or polygons do not affect previously set colors or linestyles. You must set overrideoption to true, to have a new option of this type override an existing one.

Notes

• 

Usually, the plot structures allowed in P are those plots created through any of Maple's plotting commands.  For specific information about the plot structures themselves, see plot/structure. The display command itself creates a plot data structure.  The form of this structure may depend on the graphical interface.  For information about how display combines dual-axis plots, see the plots:-dualaxisplot help page.

• 

Though the display command works with most plots and plotting options, there are some limitations.  For example, the command does not work with infinity plots.  (See plot/infinity.)  Also, a number of options, including legend, discont and adaptive, cannot be used as they must be applied when the plot is first created.

• 

An animation can be displayed with background plots by putting them together in a list and setting the insequence option to false. An animation can also be saved as an animated GIF file.  For more information, see plot/device.

Examples

withplots:

Create plots for both cosine and tangent and display them together.

F:=plotcosx,x=π..π,y=π..π,style=line:

G:=plottanx,x=π..π,y=π..π,style=point:

displayF,G,axes=boxed,scaling=constrained,title=Cosine and Tangent

Change the color of the curves in the previous plot. Note that overrideoptions must be added.

displayF,G,color=Blue,overrideoptions,axes=boxed,scaling=constrained,title=Cosine and Tangent

You can also display 3-D plots together.

F:=plot3dsinxy,x=π..π,y=π..π:

G:=plot3dx+y,x=π..π,y=π..π:

H:=plot3d2sintcoss,2costcoss,2sins,s=0..π,t=π..π:

displayF,G,H

The following example displays two animations on the same plot.

P:=animateplot,sinx+t,x=π..π,color=Red,t=π..π,frames=8:

Q:=animateplot,cosx+t,x=π..π,color=Green,t=π..π,frames=8:

displayP,Q

Using the insequence=true option, P is displayed, then Q.

P:=animateplot3d,xky+1,x=10..10,y=10..10,k=10..0,frames=4:

Q:=animateplot3d,xky+1,x=10..10,y=10..10,k=0..10,frames=4:

displayP,Q,insequence=true

P:=animateplot3d,costxsinty,x=π..π,y=π..π,t=1..2,frames=4:

Q:=animateplot3d,xcostu,x=1..3,t=1..4,u=2..4,coords=spherical,frames=4:

displayP,Q

This example illustrates how to animate with a background.

a:=animateplot3d,costxsinty,x=π..2π,y=π..2π,t=1..2:

b:=plot3d1.3xsiny,x=1..2π,y=0..π,coords=spherical:

c:=plot3dbinomial,0..5,0..5:

displayb,a,c

You can animate the Taylor approximation of the sine function. In the following example nine frames are used.

f:=sin:n:=9:

Construct a Taylor approximation animation which consists of the nine frames previously specified.

A:=displayseqplotconverttaylorfx,x=0,3i,polynom,x=3π..3π,y=1..1,style=line,axes=none,i=1..n,insequence=true:

Construct the original function which is sine.

B:=animateplot,fx,x=3π..3π,y=1..1,frames=n,style=point,axes=none:

Now display both together, frame by frame. The solid animated line is A. The stationary dotted line is B.

dis:=displayA,B,view=3π..3π,1..1:

dis

See Also

plot, plot/arrayplot, plot/device, plot/infinity, plot/interface, plot/option, plot/structure, plot3d, plot3d/option, plots, plots:-animate, plots:-dualaxisplot


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