Plotter - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Maplets[Elements]

  

Plotter

  

define a 2-D or 3-D plot viewer

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Plotter(opts)

Plotter[refID](opts)

Parameters

opts

-

equation(s) of the form option=value where option is one of background, continuous, delay, frame_backwards, frame_forward, height, pause, play, reference, `stop`, to_end, to_start, tooltip, value, visible, or width; specify options for the Plotter element

refID

-

name or string; reference to the element

Description

• 

The Plotter window body element defines a plot viewer in a Maplet application. Both 2-D and 3-D plots and animations can be displayed in a Plotter element.

  

 

• 

The Plotter element features can be modified by using options. To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.

Elements, Symbols, or Types

Assumed Option or Content

 

 

Maple 2-D or 3-D plot

value option

refID

reference option

string or symbol

tooltip option

 

 

• 

A Plotter element cannot contain other elements.

• 

A Plotter element can be contained in a Maplet or BoxLayout element, or Maplet element in a nested list representing a box layout.

• 

The following table describes the control and use of the Plotter element options.

  

An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).

  

An x in the R column indicates that the option is required in the calling sequence.

  

An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.

  

An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.

Option

I

R

G

S

 

 

 

 

 

background

x

 

x

x

continuous

x

 

x

x

delay

x

 

x

x

frame_backwards

 

 

 

x

frame_forward

 

 

 

x

height

x

 

x

x

pause

 

 

 

x

play

x

 

 

x

reference

x

 

 

 

`stop`

 

 

 

x

to_end

 

 

 

x

to_start

 

 

 

x

tooltip

x

 

x

x

value

x

 

 

x

visible

x

 

x

x

width

x

 

x

x

 

 

 

 

 

• 

The opts argument can contain one or more of the following equations that set Maplet application options.

  

 

  

background = color

  

The background color of the Maplet application.  This can be a recognized color name, an RGB color structure, or a string of the form "#RRGGBB" where each pair is a two-digit hexadecimal number.

  

 

  

height = posint

  

The height of the plot viewer in pixels. By default, the height is 400 pixels.

  

 

  

reference = name or string

  

A reference for the Plotter element.

  

If the reference is specified by both an index, for example, Plotter[refID], and a reference in the calling sequence, the index reference takes precedence.

  

 

  

tooltip = symbol or string

  

The text that appears in the tooltip help window.

  

 

  

value = specfunc(anything, {PLOT, PLOT3D})

  

A Maple plot structure.  This can be the output of plot, plot3d, or any other plotting routine, or any user-defined PLOT or PLOT3D structure.

  

 

  

visible = true or false

  

Whether the plot viewer is visible to the user.  By default, the value is true.

  

 

  

width = posint

  

The width of the plot viewer in pixels. By default, the width is 400 pixels.

  

 

• 

The following equations to the opts argument control plot animations.

  

 

  

continuous = true or false

  

If set to true, the animation plays continuously. If set to false, the animation stops after displaying all the frames once. By default, this option is set to true.

  

 

  

delay = posint

  

The delay in milliseconds between frames. The default value for this option is 100.

  

 

  

frame_backwards = true

  

Setting this parameter to true displays the previous frame in the sequence. If the animation is in progress it stops first.

  

 

  

frame_forward = true

  

Setting this parameter to true displays the next frame in the sequence. If the animation is in progress it stops first.

  

 

  

pause = true

  

Setting this parameter to true pauses the animation. It can be resumed by using the following play option.

  

 

  

play = true

  

Setting this parameter to true starts the animation (or resumes it if previously paused). By default, this option is set to false.

  

 

  

`stop` = true

  

Setting this parameter to true stops the animation. Because stop is also a keyword, you must use left single quotes (back quotes) (` `) to refer to this option.

  

 

  

to_end = true

  

Setting this parameter to true displays the last frame of the animation. If the animation is in progress it stops first.

  

 

  

to_start = true

  

Setting this parameter to true displays the first frame of the animation. If the animation is in progress it stops first.

Examples

A Maplet application that plots functions of 'x':

withMapletsElements:

maplet2dMapletEnter a function of 'x':,TextFieldTF2dsin(x),PlotterPL1plotsinx,x=0..10,ButtonPlot,EvaluatePL1=plotTF2d,x=0..10,ButtonOK,ShutdownTF2d:

resultMapletsDisplaymaplet2d

A Maplet application that plots functions of 'x' and 'y':

withMapletsElements:

maplet3dMapletEnter a function of 'x' and 'y':,TextFieldTF3d,PlotterPL1,ButtonPlot,EvaluatePL1=plot3dTF3d,x=0..10,y=0..10,ButtonOK,ShutdownTF3d:

resultMapletsDisplaymaplet3d

A simple Maplet application demonstrating the animation capabilities:

withMapletsElements

pplotsanimateplot,ax+2a,x=10..10,a=5..5,frames=20:

animatorMapletPlotterPp,continuous=false,Buttonplay,SetOptionPplay=true,Buttonstop,SetOptionP`stop`=true,Buttonpause,SetOptionPpause=true,Buttonto start,SetOptionPto_start=true,Buttonto end,SetOptionPto_end=true,Buttonbackwards,SetOptionPframe_backwards=true,Buttonforward,SetOptionPframe_forward=true,continuous,CheckBoxCONTINUOUSvalue=false,onchange=SetOptiontarget=P,`option`=continuous,ArgumentCONTINUOUS,delay,SliderDELAY100..500,200,filled=true,showticks,majorticks=100,minorticks=50,onchange=SetOptiontarget=P,`option`=delay,ArgumentDELAY,Buttonok,Shutdown:

Maplets:-Displayanimator

See Also

Maplets/WindowBodyElements

Maplets[Display]

Maplets[Elements]

Maplets[Elements][Evaluate]

Maplets[Elements][Maplet]

Maplets[Elements][SetOption]

Maplets[Elements][Shutdown]

Maplets[Elements][TextField]

Maplets[Tools][Get]

Maplets[Tools][Set]

Overview of Maplet Applications

plot

plot/structure

plot3d

plots[animate]