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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Typesetting in Plotting

Typesetting in Plots

  

This help page describes how you can include typeset text and mathematics in a plot.

 

Availability

Specifying Typeset Text and Math

Notes

Examples

Availability

• 

Typeset text and mathematics can appear anywhere in a 2-D or 3-D plot where text is normally allowed.  This includes text provided by the plots[textplot] command and the following options: annotation, caption, labels, legend, tickmarks, and title.  For more information on how to use these options, see the Examples section of this help page.

Specifying Typeset Text and Math

• 

Arbitrary expressions may be provided to the plots[textplot] command or as values for the options listed above.  These expressions are displayed on the plot as typeset output whenever possible.  Strings are displayed as plain text without the quotation marks, but names such as x, y and Pi are typeset.

• 

If you are using 2-D input mode, then you can take advantage of the different methods available in Maple for inserting 2-D math.  For example, if you wish to add the option title=0tfxⅆx, simply click on the definite integral template from the Calculus palette as the right-hand side of the title option and fill in the placeholders.

  

When using 2-D input mode, the input must parse to a Maple expression. If you wish to create a title consisting of palette entries that cannot be parsed, you must create an atomic variable from them.  This can be done by using left single quotes, as described on the help page for names, or by using the context menu (2-D Math-> Convert To -> Atomic Variable).

  

To avoid simplification or evaluation of expressions that you wish to typeset, you can create atomic variables as described above or use unevaluation quotes (see uneval).

• 

To concatenate several expressions, wrap them inside a typeset structure.  For example, you can combine math and text with the option, caption=typeset("A plot of ", x^2/(x+5), "."). Alternatively, you can provide a format string containing format codes of the form %n, where n is a non-negative integer. The format code %n is replaced by the n-th argument following the format string. The format code %0 is replaced by all the arguments.

Notes

• 

Strings are displayed without the quotation marks.  To include a quotation mark in a string, use \".  To create multiple lines of text, use \n.  See backslash for more information about using the backslash as an escape character.

Examples

plotx2x+5,x=1..5,caption=typesetA plot of ,x2x+5,.

plot0.2x3x,x2x+5,x=1..3,caption=typesetA plot of %1 and %2.,0.2x3x,x2x+5

plotsinx,x=4π..4π,tickmarks=spacingπ,default

plotcosx2,112x,x=π..π,legend=typesetCurve: ,cosx2,typesetCurve: ,112x

plotstextplot1,1,typesetThe plot of ,intfx,x=t0..t,.,font=TIMES,BOLD,20

With the following example, place the pointer over each curve to see the annotations.

plotsinx,cosx,annotation=typesetThe function ,sinx,typesetThe derivative of ,sinx

See Also

backslash

name

plot/annotation

plot/interface

plot/options

plots[textplot]

uneval