|
Description
|
|
|
The options listed below may be provided to commands that create 2-D plots. These options can be used with the plot command and are generally available to all Maple commands that generate 2-D plots. The help page for a particular command provides more detail about the plotting options it accepts.
|
|
Options should be added at the end of the calling sequence. For more information on the commonly used operator form of the calling sequence, see plot/details.
|
|
|
Options
|
|
|
adaptive
|
|
|
adaptive=n or truefalse or geometric
|
|
When plotting a function over an interval, the adaptive option controls whether an adaptive, non-adaptive or geometric plotting algorithm is used. See plot/adaptive for more details.
|
|
|
annotation
|
|
|
An annotation for a curve or a point, which appears whenever the pointer is placed over the element. For information on how to specify t, see plot/annotation. This option is available for 2-D plots only.
|
|
|
axes
|
|
|
Specifies the type of axes, one of: boxed, frame, none, or normal.
|
|
|
axesfont
|
|
|
Font for the labels on the tick marks of the axes, specified in the same manner as font. This option overrides values specified for font.
|
|
|
axis
|
|
|
Specifies information about the -axis and -axis. The first form axis=t applies the information given in t to both axes. The second form allows the information to be specified for a single axis, with dir taking the value 1 (-axis) or 2 (-axis). For details, see plot/axis.
|
|
|
axiscoordinates
|
|
|
The coordinate system used for display of the axes. The value t can be either polar or cartesian. By default, Cartesian axes are displayed. If t is polar, then radial and angular axes are generated. This option is used together with the coords=polar option.
|
|
|
background
|
|
|
The background image or color for the plot. The value t can be the name of an image file, as a string, a name, a datatype=float[8] Array as used with the ImageTools package, or a color. A plot can only have a single background image or color.
|
|
If the size option is omitted then the dimensions of the plot are determined by the dimensions of the image. If the size option is provided then the image is displayed with the dimensions of the plot.
|
|
A color may be given as a ColorTools[Color] object or as a color string. If t is a string, then it is first interpreted as a filename. If the file t does not exist, it is then assumed to be a color.
|
|
|
caption
|
|
|
The caption for the plot. The value c can be an arbitrary expression. For information on how to specify c, see plot/typesetting. The value c can also be a list consisting of the caption followed by the font option. The default is no caption.
|
|
|
captionfont
|
|
|
This option defines the font for a plot caption, specified in the same manner as font. This option overrides values specified for font.
|
|
|
color
|
|
|
Allows you to specify the color of the curves to be plotted. For details, see plot/color.
|
|
|
colorscheme
|
|
|
colorscheme=t or colourscheme=t
|
|
Allows you to apply a color scheme to a surface or set of points. For details, see plot/colorscheme.
|
|
|
coordinateview
|
|
|
coordinateview=[r1..r2, a1..a2]
|
|
This option is used only when the axiscoordinates option has the value polar. When that is the case, then r1..r2 specifies the radial range that is to be displayed and a1..a2 specifies the angular range.
|
|
|
coords
|
|
|
The coordinate system. The value cname is one of the choices listed on the coords help page. For more information about using this option, see plot/coords. By default, Cartesian axes are displayed. To generate polar axes with polar plots, use the axiscoordinates=polar option along with the coords=polar option.
|
|
|
discont
|
|
|
Allows detection of discontinuities. For details, see plot/discont.
|
|
|
filled
|
|
|
If the filled option is set to true, the area between the curve and the -axis is given a solid color. The value of the filled option can also be a list containing one or more suboptions (color, style or transparency). The options in the list are applied only to the filled area, and not to the original curve itself. This option does not work with non-Cartesian coordinate systems.
|
|
|
filledregions
|
|
|
If the filledregions option is set to true, the regions defined by the curves are filled with different colors. This option is valid only with the following commands: contourplot, implicitplot, and listcontplot. This option does not work with non-Cartesian coordinate systems.
|
|
|
font
|
|
|
This option defines the font for the plot title, caption, axis tickmark labels, and axis labels if no values have been specified for the axesfont, captionfont, labelfont, or titlefont options. The value l is a list of the form [family, style, size].
|
|
The value of family can be one of Times, Courier, Helvetica, or Symbol. It can also be any font name supported by your system, for example, Tahoma and Lucida in Windows. The first letter of the family name must be capitalized.
|
|
The value of style can be omitted or one of roman, bold, italic, bolditalic, oblique, or boldoblique. The Symbol family does not accept a style option.
|
|
The final value, size, is the point size to be used.
|
|
|
gridlines
|
|
|
When gridlines=true or gridlines is provided, default gridlines are drawn. The default is gridlines=false.
|
|
For greater gridline control, use the axis option. If the axis option is also provided and contains a gridlines suboption, then that option overrides this gridlines option.
|
|
|
labeldirections
|
|
|
This option specifies the direction in which labels are printed along the axes. The values of x and y must be horizontal or vertical. The default direction of any labels is horizontal.
|
|
|
labelfont
|
|
|
Font for the labels on the axes of the plot, specified in the same manner as font. This option overrides values specified for font.
|
|
|
labels
|
|
|
This option specifies labels for the axes. For information on how to specify x and y, see plot/typesetting. The default labels are the names of the variables in the original function to be plotted, if these are available; otherwise, no labels are used.
|
|
|
legend
|
|
|
Legend entry for a plot. For information on how to specify s, see plot/typesetting. If the plot command is being used to plot multiple curves, then s can be a list containing a legend entry for each curve. Note that a set cannot be used as it does not preserve the order of the legend entries.
|
|
|
legendstyle
|
|
|
Legend style for a plot. The value s is a list consisting of one or more suboptions. The suboptions available for the legendstyle option include font=f and location=loc. For information on how to specify the font, see the entry for the font option. The location=loc suboption allows values top, bottom, right and left for loc.
|
|
|
linestyle
|
|
|
Controls the line style of curves. The linestyle value t can be one of the following names: solid, dot, dash, dashdot, longdash, spacedash, or spacedot. The default value of t is solid. The value t can also be an integer from 1 to 7, where each integer represents a line style, as given in the order above.
|
|
|
numpoints
|
|
|
Specifies the minimum number of points to be generated. Note: plot can employ several adaptive plotting schemes. Hence, plot often generates more than the minimum number of points. There is more detail on the adaptive option help page.
|
|
|
redraw
|
|
|
Determines whether to allow the plot to be redrawn when the view is changed by a user's action in the GUI (either a zoom, a pan, or a resize), or when multiple plots are combined using plots[display]. By default the redraw option is set to true, which allows the redrawing to take place in the aforementioned circumstances. For efficiency reasons, this redrawing may be undesired; it can be prevented by setting redraw=false. In the case of a call to plots[display], the redrawing will be prevented if any of the component plots were called with the option redraw=false. This property of a plot that it is not to be redrawn persists after repeated passes through plots[display]. This option is available for the plot command, and there is an equivalent option for the command plots[display].
|
|
|
resolution
|
|
|
Sets the horizontal display resolution of the device in pixels (the default is ). The value of n is used to determine when the adaptive plotting scheme terminates. A higher value results in more function evaluations for non-smooth functions. This option is applicable only when adaptive plotting is used. (See the adaptive option above.)
|
|
|
sample
|
|
|
A list of numerical values which is to be used for the initial sampling of the function for some plotting modes. Normally, the function is sampled at additional points. To restrict sampling to only these values, include the adaptive=false option when calling the plot command. For more details, see the adaptive option help page.
|
|
|
scaling
|
|
|
Controls the scaling of the graph. The default value of s is unconstrained, which means the plot is scaled to fit the plot window. The constrained value causes all axes to use the same scale, so that, for example, a circle appears perfectly round.
|
|
|
size
|
|
|
Specifies the size of the plot window. You can set the size of the plot window by specifying the number of pixels, a proportion of worksheet width, or a ratio, such as a square, the golden ratio, or a custom ratio.
|
•
|
The width w must be a positive numeric value or the string "default".
|
•
|
The height h must be a positive numeric value, or one of the following strings: "default", "golden", or "square".
|
•
|
If w or h is a number greater than or equal to 10, it specifies the number of pixels for the width or height.
|
•
|
If either is "default", then the default size, which may be interface-specific, is used.
|
•
|
If w is a number less than 10, then the plot window width is w multiplied by the width of the worksheet. This form for w is ignored if the plot is part of a plot array. If h is a number less than 10, then the height is h multiplied by the width of the plot window as given by w.
|
•
|
If h is "square", then this is equivalent to h having the value 1.0. If h is "golden", then this is equivalent to h having the value equal to the reciprocal of the golden ratio ().
|
|
|
smartview
|
|
|
Determines an appropriate view of the plot data. The plot command generates data based on the range provided by the user or on a default range if this is not given. When the smartview=true option is provided, a view that tries to present the important regions of the data is computed. To show all data computed, use the smartview=false option. The default setting of smartview is true. This option is available for the plot command only, and only applies to curves, not points, polygons or text.
|
|
|
style
|
|
|
The plot style must be one of line, point, pointline, polygon (patchnogrid), or polygonoutline (patch). The names in parentheses are aliases for the option values. The styles line, polygon, and polygonoutline all draw curves by interpolating between the sample points. The point style results in a plot of the points only. The default style, polygonoutline, draws any polygons as filled with an outline. The polygon style shows the polygons with no outline, whereas line draws the polygons as outlines only. The pointline style is a combination of the point and line styles.
|
|
|
symbol
|
|
|
Symbol for points in the plot, where the value s is one of asterisk, box, circle, cross, diagonalcross, diamond, point, solidbox, solidcircle, soliddiamond.
|
|
|
symbolsize
|
|
|
The size (in points) of a symbol used in plotting can be given by a positive integer. This does not affect the symbol POINT. The default symbol size is 10.
|
|
|
thickness
|
|
|
This option specifies the thickness of lines in the plot. The thickness n must be a non-negative number; a value of 0 produces the thinnest line that looks good in most contexts. The default value is 1.
|
|
|
tickmarks
|
|
|
The values m and n specify the tickmark placement for the -axis and -axis respectively and can take one of the following forms: an integer specifying the number of tickmarks, a list of values specifying locations, a list of equations each having the form location=label, a name, or a spacing structure. For more details, see plot/tickmarks.
|
|
For greater control over the appearance of tickmarks, use the axis option. If the axis option is also provided and contains a tickmarks suboption, then that option overrides this tickmarks option.
|
|
|
title
|
|
|
The title for the plot. The value t can be an arbitrary expression. For information on how to specify t, see plot/typesetting. The value t can also be a list consisting of the title followed by the font option. The default is no title.
|
|
|
titlefont
|
|
|
Font for the title of the plot, specified in the same manner as font. This option overrides values specified for font.
|
|
|
transparency
|
|
|
This option specifies the transparency of the plot surface. The transparency t must evaluate to a floating-point number in the range 0 to 1. A value of 0 means "not transparent" while a value of 1 means "fully transparent."
|
|
|
useunits
|
|
|
This option, with t set to true, indicates that units are part of the function or range arguments and should be included in the axes labels. The value t can also be a list of units. Details about the useunits option is available on the plot/units help page.
|
|
|
view
|
|
|
view=[xmin..xmax, ymin..ymax]
|
|
This option indicates the minimum and maximum coordinates of the curve to be displayed on the screen. The default is determined by the smartview option: if smartview=false is given, then all the plot data will be displayed; if smartview=true or the smartview option is not given, then the plot structure will be analyzed to determine a reasonable view of the data which allows you to see the significant features of the data. The coordinateview option is normally used with polar plots.
|
|
|
|
Notes
|
|
•
|
If the same option is provided more than once, with different values, then the final value specified is generally the one used.
|
•
|
The options described above are all available for the Standard Worksheet interface. If you are using a different interface, see the plot/interface help page.
|
|
|
Examples
|
|
|
Simple Example
|
|
|
This example uses the title and titlefont options:
|
|
titlefont = ["ROMAN", 15]
|
>
|
|
|
|
Setting Axes and Graph Properties 1
|
|
|
This example uses the following axes and graph properties:
|
|
tickmarks = [spacing (Pi), default]
|
>
|
|
|
|
Setting Axes and Graph Properties 2
|
|
|
This example sets the line properties, creates axes labels, and produces a legend:
|
|
title = "Simple Trig Functions"
|
|
legend = ["Sine Plot", "Cosine Plot"]
|
|
titlefont = ["ROMAN", 15]
|
|
labels = ["x values", "y values"]
|
|
labeldirections = ["horizontal", "vertical"]
|
|
labelfont = ["HELVETICA", 10]
|
|
linestyle = [solid, longdash]
|
|
axesfont = ["HELVETICA", "ARIAL", 8]
|
|
legendstyle = [font = ["HELVETICA", 9], location = right])
|
>
|
|
|
Note: titlefont, labelfont, and axesfont can be replaced by the font command as follows:
|
|
font = [title, "ROMAN", 15]
|
|
font = [label, "HELVETICA", 10]
|
|
font = [axes, "HELVETICA", "ROMAN", 8]
|
|
|
Setting Tickmarks
|
|
|
In this example tickmarks are placed at specific locations on the x-axis and default tickmarks on the y-axis:
|
|
tickmarks=[[1="a", 2="b", 3="c", 4="d"], default])
|
>
|
|
|
|
Defining a Specific Range
|
|
|
The sample command provides a list of numerical values for the surd function. In this example the sixth root of x is computed, where x is generated from a random sample created from a list of calculated numerical values:
|
|
sample=[seq( exp( i ), i= -20..0)])
|
>
|
|
|
|
Setting Colors
|
|
|
This example defines the fill area and color, the line color, thickness, and transparency:
|
|
filled=[color="Blue", transparency=0.5]
|
>
|
|
|
|
|
Compatibility
|
|
•
|
The coordinateview option was introduced in Maple 15.
|
•
|
The tickmarks option was updated in Maple 15.
|
•
|
The smartview option was introduced in Maple 16.
|
•
|
The background, colorscheme and size options were introduced in Maple 18.
|
•
|
The style option was updated in Maple 2015.
|
•
|
The annotation option was introduced in Maple 2017.
|
•
|
The redraw option was introduced in Maple 2022.
|
•
|
The adaptive, color, colorscheme and coords options were updated in Maple 2022.
|
|
|
|