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

Online Help

All Products    Maple    MapleSim


Explore

explore mathematical expressions, plots, or images that depend upon parameters

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Explore(expr)

Explore(expr, pars )

Explore(expr, opts )

Explore(expr, pars, opts )

Parameters

expr

-

anything; the expression or function call to explore

pars

-

(optional) seq(name={range,list}); one or more parameter's values' specifications. Use the parameters keyword option instead for specifying the controller and other qualities for a particular parameter.

opts

-

one or more keyword options, as described in the Options section

Options

• 

adaptview = truefalse

  

Specifies whether the viewing range (view) automatically adapts to the largest data range of all frames previously plotted, and whether the lower and upper parameter values are used to pre-compute a viewing range. The default value is true, and by specifying the option as false all the plotting frames will have their own independent viewing ranges. This behavior can be overridden by the view option of the plotting commands. This functionality is not supported by Arrays of plots.

• 

animate = {truefalse,identical(never)}

  

Sets a default for animation check boxes alongside each parameter controller. If set to true then by default animation check boxes are initially selected (checked). If set to false then by default animation check boxes are present but initially unselected (unchecked). If set to never then by default animation check boxes are absent. If this option is omitted, and if any individual parameter specification enables its own animation, then animation check boxes are present for all sliding controllers which do not have an override.

• 

autorecord = truefalse

  

Toggle on recording of plots automatically, if the recordto option has been supplied. The default value is false.

• 

autorun = truefalse

  

Play the animation automatically, upon embedding into the current worksheet. When set to true the animate option is implied as true even if the animate option is not set. This has no effect when using the newsheet option.

• 

componentbackground = {string,name,list}

  

This option specifies the background color of the Plot Component or Math Component. The default value is "White".

• 

componentborders = truefalse

  

This option specifies whether the borders of the Plot Component or Math Component are shown. By default the borders of the Plot Component are shown, and those of the Math Component are not shown.

• 

documentproperties = list(string=string)

  

A list of equations for each of which the left-hand side string specifies a Document Property key and the right-hand side string specifies the corresponding value. This option is only valid when accompanied by the options newsheet=true or insert=false, and the Document Properties are set on the new document.

• 

echoexpression = truefalse

  

This option specifies whether the unevaluated expression appears on the left-hand side of a equation displayed in the embedded Math Component. The default value is true. This option has no effect in the case of an explored plot or image.

• 

fillcolor = {string,name,list}

  

This option specifies the fill (background) color for all Table cells and controllers, unless overridden for a controller in the parameters option. The default value is "White".

• 

fontcolor = {string,name,list}

  

This option specifies the font (foreground) color for all Table cells and controllers, unless overridden for a controller in the parameters option. The default value is "Black".

• 

initialvalues = list(name=realcons)

  

A list of equations specifying parameter values used in the initial evaluation of expr and as the initial values for the sliding controllers.

  

By default the left endpoints of the slider ranges are used for all parameters whose initial values are not specified by this option. If expr fails to evaluate without error then the right endpoints of the slider ranges are used for all parameters whose initial values are not specified by this option.

• 

insert = truefalse

  

Insert the assembly of embedded components. The default value is true. This option can be used in conjunction with the returnxml option to construct worksheet source of interactive applications when the Standard GUI is not the currently running user interface.

• 

loop = {truefalse,identical(never)}

  

Enable looping when animating. When set to true a check box for enabling looping is embedded and initially selected (checked), in the case of an animation. When set to true the animate option is implied as true even if the animate option is not set. When set to false a check box for enabling looping is embedded and initially unselected (unchecked), in the case of an animation. When set to never a check box for enabling looping is absent. The default value is never.

• 

markers = list({list({name,realcons,identical(symbolsize,symbol,color)=anything}),identical(symbolsize,symbol,color)=anything})

  

A list of lists of pairs of parameter names or fixed numeric value, or point modifiers, for the case of exploring a 2-D plot. For a marker [p1,p2] a symbol is included in the plot at position [v1,v2] using the current values v1 and v2 respectively of the sliding controllers of parameters p1 and p2. Each marker symbol on the plot can be dragged interactively with the pointer device (e.g. mouse), as a click and drag action.

  

By default the sliding controllers associated with parameters used as markers are not shown. This can be overridden by using the showmarkercontrols option or by qualifying a controller as shown within the parameters option.

  

While dragging a marker the pair of associated sliding controllers will be updated with new values. While interactively changing either of the associated sliding controllers the plot will be updated with the new marker positions. The markers can only be dragged to positions which fall within the ranges specified for the associated parameters.

  

In the case of just a single marker being present then clicking on a point in the plot will move the marker to that position and its sliding controllers will be updated accordingly. This single-click move will only occur if the coordinates of the clicked position fall within the ranges specified for the associated parameters.

  

In addition to the name or value pair, each inner list may also contain keyword options as modifiers to specify the color, symbolsize, or symbol for the corresponding marker. These conform to the point options for 2D plots.

  

The outer list may also contain those same keyword options, in order to qualify the symbols for all markers. These are overridden by any such qualifier appearing within the inner list specifying a marker.

• 

newsheet = truefalse

  

Launch the exploration in a new Document, rather than embed into the current worksheet. By default the exploration assembly is embedded in the current worksheet at a position below the output of the current execution point.

• 

numeric = truefalse

  

This option specifies whether evalf is applied around each individual evaluation of expr. This behavior is distinct from whether the parameters take on floating-point values.

• 

numframes = posint

  

The number of frames for an animation. The default value is 50.

• 

orientation = identical(vertical,horizontal)

  

This option specifies the orientation of any parameter's Slider controller as either horizontal or vertical. The default is horizontal.

• 

overview = string

  

A string inserted as a plaintext description of the embedded interactive application. The description appears as text in a top row of the Table. By default no description appears.

• 

parameters = list({name={range,list},list})

  

A list specifying the parameters that can be varied. Each entry of this list corresponds to one parameter. An entry can have three forms:

– 

An entry of the form name = range specifies that the parameter with the given name can assume values in the given range. It can be controlled interactively with a sliding component.

  

If both endpoints of a parameter's range are integers then the associated slider takes on only integer values.  If either endpoint of a parameter's range is entered as a non-integer value (such as 2.6, Pi, 4/7, or sqrt(2)) then evalf is applied to both endpoints of that range and the associated parameter take on floating-point values.

– 

An entry of the form name = list specifies that the parameter with the given name can assume values from the given list. It can be controlled with a ComboBox or a CheckBox if the list has only two values true and false.

– 

An entry that is a list must contain exactly one element which is either a name or an equation whose left-hand side is not one of the qualifying option names listed below. If this element is an equation then it is processed in the same way as the name = range and name = list forms above. If this element is a name then it is processed similarly to name = [true,false] and by default is controlled as a CheckBox. The other valid entries of the list are qualifying option names and/or equations that apply to this parameter only.

  

Whenever an option is not specified in this list, it takes its default value from the options specified as top-level options that are part of the Explore call, or the global default if no such option is given. For example, if a parameter has a Slider as its controller and it is specified in a list with the equation placement = right, then its controller is placed on the right of the component displaying results. If it is specified with a list containing no placement option (or specified as name = range), and the call to Explore contains the option placement = left, it is placed to the left. If it is specified with a list containing no placement option (or specified as name = range), and there is also no placement option in the top level call to Explore, then it gets the default placement for parameters with a Slider as controller: at the bottom.

  

Special qualifying options are described below. Any additional options are passed to the individual controller constructors.

• 

controller = {name,string}

  

This overrides the component type used to control this parameter's value. Valid choices are slider, volumegauge, dial, meter, rotarygauge, checkbox, combobox, listbox and textarea. The value for this option can be a name or a string, spelled in any mix of upper and lowercase. See EmbeddedComponents for more details about these interactive components.

• 

label = {name,string}

  

This overrides the label displayed beside the controller for this parameter. The default label is the name of the parameter itself.

• 

shown = truefalse

  

This specifies whether the controls for the parameter are visible. The default for marker controllers is false, while the default for non-marker controllers is true. This overrides the value of the showmarkercontrols option, for the given parameter.

• 

placement = identical(left,bottom,right,top)

  

This overrides the value of the placement option, for the given parameter.

• 

animate = {truefalse,identical(never)}

  

This overrides the value of the animate option, for the given parameter. Like for the top level animate option, you can shorten animate = true to the equivalent animate.

• 

orientation = identical(horizontal,vertical)

  

This overrides the value of the orientation option, for the given parameter.

  

If the parameters option is not supplied then a dialog box appears which allows customized creation of the exploration application.

• 

placement = identical(left,bottom,right,top)

  

Sets a new default for placement of parameter controllers, with respect to the component that displays the explored plot, expression, or image. If unset then sliding components are placed at bottom by default, and ComboBox controllers for nonnumeric discrete valued parameters are placed left. This new default may be overridden in the specification of any individual parameter.

• 

recordto = name

  

A global name to which generated plots are assigned to as indexed entries whenever the embedded record button is toggle on (solid red). The entries are indexed in the order in which they are assigned, starting from 1. This named table can be subsequently used outside of the exploration. See also the autorecord option.

• 

returnxml = truefalse

  

Return a string containing XML worksheet source for the exploration application. The default behavior is that the return value is NULL.

• 

showbanner = truefalse

  

This option controls whether the graphic banner image appears in the case that the exploration application is launched in a new Document. By default the banner appears at the top of a newly launched Document. No banner is included for the default case of the exploration interface embedded into the current worksheet.

• 

showhiddenborders = identical(always,never,worksheet)

  

This option specifies whether hidden borders are displayed upon mouse pointer rollover. The values of always or never override the hidden Table borders property of the Document or Worksheet. If the newsheet option is supplied as true then the value of showhiddenborders defaults to worksheet. If the newsheet option is false or not supplied then the value of showhiddenborders defaults to never.

• 

showmarkercontrols = truefalse

  

Include sliding controllers for parameters listed in the markers option. The default value is false. This can be overridden in the parameters' individual specification provided in the parameters option.

• 

size = list({posint,identical(default)})

  

A list of two positive integers which sets the size (width and height) in pixels of the component displaying results.

  

The Math Expression Component inserted by Explore has its auto-fit property enabled by default. Following execution of the Explore command the auto-fit property can be disabled by right-clicking on the Math Expression Component, and from its Component Properties, clearing the Auto-fit container check box. If the size option to Explore is used, its effect won't be seen unless the auto-fit property is unselected.

  

With respect to resizing plots, the default behavior for the Explore command is to set the size of the Plot Component to the size of the plot.  Supplying the size option to the Explore command sets the size of the Plot Component irrespective of any size options on the plot.

  

In the case of images, by default the width and height properties of the inserted Label Component are given the width and height of the initially computed image.  Supplying the size option to the Explore option sets the width and height of the Label.

  

Following insertion, the size of the display component can be changed by selecting it and changing its properties in the Context Panel.

• 

startupdefinitions = list({name,name=anything})

  

A list of names or equations with names on the left-hand side. This option is only valid when accompanied by the options newsheet=true or insert=false. For each name an assignment statement is placed in the Startup Code of the newly opened document, assigning to that name either its current value under 2-level evaluation or the right-hand side of the equation.

• 

tablealignment = identical(left,right,center)

  

This option specifies how the Table containing the exploration is aligned horizontally in the Worksheet or Document. By default it is aligned to the center.

• 

tableborders = truefalse

  

The option specifies whether external borders of the Table containing the exploration are shown. They are shown by default.

• 

title = string

  

A string used as a title for the embedded worksheet Table. By default no title appears.

• 

width = And(realcons,nonnegative)

  

The width of the Table which encloses the entire exploration. If the option widthmode has value pixels then the width value specifies the number of pixels under 100% magnification. If the option widthmode has value percentage then the width value specifies the percentage of the worksheet's width that is occupied by the exploration. The default width in the case widthmode=pixels is determined automatically by the components and controls in the exploration. The default width in the case widthmode=percentage is 100% of the worksheet.

• 

widthmode = identical(percentage,pixels)

  

This option specifies whether the value of the width option is taken as a percentage of the worksheet or the width in pixels of the exploration under 100% magnification.

Description

• 

The Explore command takes an arbitrary Maple expression or function call and displays an interactive application to explore its evaluation at varying values of unassigned, dependent parameters. The interactive application for exploration is comprised of various embedded components within a Standard GUI Table.

  

Embedded components act as controllers which allow the values of the parameters to be changed. The result of evaluating the expression or function call at the values specified by the controllers is displayed either as an expression in a Math Component, a plot in a Plot Component, or as an image on a Label Component.

• 

A plotting command to be explored can be a function call to plot, plot3d, a command in the plots package, or a command or user-defined procedure which returns a two- or three-dimensional plot structure or an Array of such plot structures.

  

In the case of a Math Component, if the explored expression evaluates to an expression sequence then the expression is wrapped within a list before being placed within the Math Component.

• 

Parameter values are used by re-evaluating the original expression or function call. The parameter names are not assigned values in this process. In consequence, instances of the unassigned parameter names within a procedure body will not be evaluated. In order to use the values within a procedure the parameter name should occur in an argument to an explored function call.

• 

The resulting exploration application is not the return value of the Explore command. The default return value is NULL.

• 

This command inserts the assembly of Tables and Embedded Components into the worksheet using the InsertContent facility. The inserted content is placed after any usual output of the Execution Group in which this command is called. Each Execution Group allows for only one inserted result to exist at any given time. Multiple calls to commands which utilize the InsertContent facility made within the same Execution Group will result in each successive inserted assembly replacing any assembly inserted earlier for that Execution Group.

  

The newsheet option allows for the exploration assembly to appear in a new Document tab instead of being inserted into the current worksheet.

• 

The Explore command can also be applied using the Context Panel.

  

Note: This feature only works in the Maple Standard Worksheet interface.

Examples

To interact with the examples provided below, open this help page as a worksheet.

See Explore Examples for additional examples and discussion of the various command options.

Exploreplotsinaxx2,x=2π..2π,view=30..30,a=1.0..5.0

a

 

Explorefactorxa1,parameters=a=2..9,initialvalues=a=4

a

 

Exploreplotb+0.7sinxa+1x+b,x=4π..4π,view=2..6,a=2.0..1.0,b=0...3.0

a

b

 

Exploreplot3dsinaxby,x=π..π,y=1..sqrt5,view=5..5,orientation=vertical,parameters=a=1..4.0,placement=left,b=1.0..sqrt5,placement=right

a

b

 

The fill and font colors can be customized.

Exploreplot3dsinaxy2,x=π..π,y=1..1,axis=color=cyan,view=1..1,a=1..5.0,componentbackground=Black,fillcolor=LightBlue,fontcolor=DarkBlue

a

 

Parameters taking discrete values can be controlled with ComboBox or ListBox components.

Exploreplots:-displayColorTools:-SpatterPlot3dColorTools:-GetPalettep,space=c,symbol=box,orientation=piecewisec=Laborc=Luv,172,12,145,55,75,0,view=piecewisec=RGBorc=HSV,0..1,0..1,0..1,c=xyY,0...0.7,0...0.7,0...1.0,default,default,default,projection=0.78,parameters=p=X11,HTML,Resene,Generic,CSS,Niagara,MapleV,OldPlots,Mono,label=Palette,c=RGB,HSV,Lab,Luv,xyY,label=`Color Space`,size=500,500,placement=bottom,orientation=vertical,fillcolor=#BCBCBC,componentbackground=#777777,title=Color Palette SpatterPlots

 

 

 

In the next example the red marker controls parameters a and b, while the green marker controls only parameter c. The markers can be moved with the mouse cursor. This example uses no custom user-authored procedures and will function after restart, without the need to re-execute code.

Exploreplots:-displayplottools:-polygon0,1,a,b,a,c,0,1,color=Orange,view=0..5,0..5,a=1.0..4.0,b=1.0..4.0,c=1.0..4.0,initialvalues=a=3,b=2,markers=a,b,symbol=circle,symbolsize=35,color=Red,0,c,symbol=solidbox,symbolsize=20,color=Green,tableborders=false,componentborders=false

 

 

 

 

In the next example the parameters freq and A are controlled by TextArea components. Note the supplied numeric initial values for these parameters, without which the initial values used would be simply the unassigned global parameter names. To update the plot with a new value for one of these parameters edit the value in its TextArea controller and press the Enter key.

ExploreplotAsinfreqx,x=0..2π,view=A..A,parameters=freq,controller=textarea,label=Frequency,A,controller=textarea,label=Amplitude,initialvalues=freq=3.0,A=2.5

 

 

 

A 2-D or 3-D plot exploration can be automatically run with the frames automatically assigned as indexed entries of a named table.

Exploreplotsinax,x=π..π,size=400,200,a=1.0..5.0,recordto=myanimation,autorecord,autorun,numframes=10

 

 

a

 

The entries of the table can be subsequently used as an animation. For example, once displayed the animation can be run using the animation toolbar.

plots:-displayopconvertmyanimation,list,insequence,size=400,200

Compatibility

• 

The echoexpression, initialvalues, newsheet, numeric, overview, parameters, returnxml, showbanner and title options were introduced in Maple 17.

• 

For more information on Maple 17 changes, see Updates in Maple 17.

• 

The animate, autorun, insert, loop, numframes, orientation, placement, showmarkercontrols and size options were introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

• 

The documentproperties and startupdefinitions options were introduced in Maple 2015.

• 

The markers option was updated in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

• 

The Explore command was updated in Maple 2016.

• 

The autorecord, componentbackground, componentborders, fillcolor, fontcolor, recordto, showhiddenborders, tablealignment, tableborders, width and widthmode options were introduced in Maple 2016.

• 

The parameters and placement options were updated in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

• 

The adaptview option was introduced in Maple 2024.

• 

For more information on Maple 2024 changes, see Updates in Maple 2024.

Applications

Building an Application with Explore

Explore Examples

See Also

Exploration Assistant