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

Online Help

All Products    Maple    MapleSim


DocumentTools[Layout]

  

InlinePlot

  

generate XML for an InlinedPlot element

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

InlinePlot( p, opts )

Parameters

p

-

(optional) ; content for the InlinedPlot element, such as the result of a plotting command

opts

-

(optional) ; one or more keyword options as described below

Options

• 

gridlinevisibility truefalse:=true ; Specifies whether gridlines are visible, if present in the plot content.

• 

height : {posint,identical(NoUserValue)}:=NoUserValue ; The height in pixels. If height is NoUserValue and p is a 2D plot constructed with the size option specifying a positive pixel value for height then that value is used for height. Otherwise the default value is 500.

• 

legendvisibility {truefalse,identical(NoUserValue)}:=NoUserValue ; Specifies whether a legend may be visible. The default behavior is for the legend to be visible if any legend is present for any curve or other constituent of p. The option values true and false override the default.

• 

scale : realcons:=1.0 ; The scaling factor for 3D plots, a positive real value.

• 

width : {posint,identical(NoUserValue)}:=NoUserValue ; The width in pixels. If width is NoUserValue and p is a 2D plot constructed with the size option specifying a positive pixel value for width then that value is used for width. Otherwise the default value is 500.

• 

xtrans : realcons:=0.0 ; The horizontal translation for 3D plots, in units of 10 pixels.

• 

ytrans : realcons:=0.0 ; The vertical translation for 3D plots, in units of 10 pixels.

Description

• 

The InlinePlot command in the Layout Constructors package returns an XML function call which represents a InlinedPlot element of a worksheet.

• 

An InlinedPlot element is used to display a plot inlined within a Document or Worksheet.

• 

The generated XML may be used with the results of other commands in the Layout Constructors package to create an entire Worksheet or Document in XML form. Such a representation of a Worksheet or Document may be inserted into the current document using the InsertContent command.

• 

For construction of a PlotComponent see the Plot Component command.

Examples

withDocumentTools:

withDocumentTools:-Layout:

Executing the InlinePlot command produces a function call, in which the supplied plot structure p has been encoded.

pplotsinx,x=0..π,adaptive=false,numpoints=5:

PInlinePlotp

P_XML_Plotgridlinevisibility=0,height=500,legendvisibility=false,plot-scale=1.0,type=two-dimensional,width=500,plot-xtrans=0.,plot-ytrans=0.,input=_ATTRIBUTE("input" = [TABLE(1 = plot,2 = [sin(x)],3 = (x = 0 .. Pi),4 = (numpoints = 5),5 = (adaptive = false)), "originalview" = [0. .. 3.14159265044999980, 0. .. .999419429119358771], "originalaxesticks" = AXESTICKS(_PITICKS,DEFAULT,_ATTRIBUTE("source" = "mathdefault"))]),LUklUExPVEc2JCUqcHJvdGVjdGVkRyUoX3N5c2xpYkc2Ji1JJ0NVUlZFU0c2JEYlRiY2JFgsJSlhbnl0aGluZ0c2IkYuW2dsJyIlISEhIysiJiIjMDAwMDAwMDAwMDAwMDAwMDNGRUE0QkEzQkUxNzlFMjMzRkY4OTY2NkQxMkE1QjY4NDAwMkI5RjJGNzZENzgzNjQwMDkyMUZCNTNEODRCMkUwMDAwMDAwMDAwMDAwMDAwM0ZFNzZGMzk5NDE2N0Q1NjNGRUZGQjNFNzQ2MUJGOTQzRkU2RjkyMTEyNzU4ODYyM0UyQUY4N0E5MUE2MjYzMy1JJ0NPTE9VUkc2JEYlRiY2J0kkUkdCRzYkRiVGJiQiKUMpZXElISIpJCIiIUY5JCIpaD4hXCYhIiotJStfQVRUUklCVVRFRzYjL1Enc291cmNlRi5RLG1hdGhkZWZhdWx0Ri4tSStBWEVTTEFCRUxTRzYkRiVGJjYkJSJ4R1EhRi4tSSpBWEVTVElDS1NHNiRGJUYmNiUlKV9QSVRJQ0tTR0koREVGQVVMVEc2JEYlRiZGPS1JJVZJRVdHNiRGJUYmNiU7RjgkIitdRWZUSkY8Rk5GPQ==

(1)

By using additional commands from the Layout Constructors package a nested function call can be produced which represents an entire worksheet.

xmlWorksheetGroupInputTextfieldP:

That XML representation of a worksheet can be inserted directly.

InsertContentxml:

The height and width options can be used to control the displayed dimensions of both 2D and 3D plots.

pplotsinxx2,x=2π..2π:

PInlinePlotp,height=200,width=500:

InsertContentWorksheetGroupInputTextfieldP:

pplot3dsinxy2,x=2π..2π,y=1..1:

PInlinePlotp,height=200,width=300:

InsertContentWorksheetGroupInputTextfieldP:

The size option used in constructing a 2D plot, when specifying width and height as positive integer pixel values, is respected by default.

pplotsinxx2,x=2π..2π,size=500,300:

PInlinePlotp:

InsertContentWorksheetGroupInputTextfieldP:

A legend in a 2D plot is made visible by default.

pplotsinxx2,x=2π..2π,legend=typesetsinxx2,size=200,200:

P1InlinePlotp:P2InlinePlotp,legendvisibility=false:

InsertContentWorksheetTableRowP1,P2:

The initial pan and scale of a 3D plot can be controlled by options.

pplot3dx2+y2,x=1..1,y=1..1:

P1InlinePlotp:

P2InlinePlotp,xtrans=10.0,ytrans=5.0:

InsertContentWorksheetGroupInputTextfieldP1,P2:

pplot3dx2+y2,x=1..1,y=1..1:

P1InlinePlotp:

P2InlinePlotp,scale=1.5:

InsertContentWorksheetGroupInputTextfieldP1,P2:

The gridlinevisibility option only controls whether gridlines present in a plot will be visible. Supplying the gridlinevisibility option will not by itself cause gridlines to be added to a plot result.

pgplotsin,gridlines=true:

pnplotsin,gridlines=false:

TTablewidthmode=pixels,width=300,alignment=center,RowInlinePlotpn,gridlinevisibility=true,InlinePlotpn,gridlinevisibility=false,RowInlinePlotpg,gridlinevisibility=true,InlinePlotpg,gridlinevisibility=false:

InsertContentWorksheetT:

Using a fill color on a Cell is an effective way to show a 3D plot with a black background. The next example uses the InlinePlot element constructor for the content of the Cell.

PInlinePlotplot3dx2siny,x=1..1,y=2π..2π,axis=color=cyan,labels=,,:CCellTextfieldP,fillcolor=black:TTableColumn,RowC,widthmode=pixels,width=300,alignment=center:

InsertContentWorksheetT:

Compatibility

• 

The DocumentTools:-Layout:-InlinePlot command was introduced in Maple 2015.

• 

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

• 

The height and width options were updated in Maple 2020.

See Also

Component Constructors

DocumentTools

InsertContent

Layout Constructors

Plot Component

XMLTools