Plot Options - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Graphics : 2-D : Options : plot/options

Plot Options



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.


For an interactive method of exploring the options in the plot command, use the Interactive Plot Builder.




adaptive=n or truefalse


When plotting a function over an interval, the interval is sampled at a number of points, controlled by sample and numpoints.  Adaptive plotting, where necessary, subdivides these intervals to attempt to get a better representation of the function. This subsampling can be turned off by setting the adaptive option to false.  By default, this option is set to true, and intervals are subdivided at most 6 times in trying to improve the plot.  By setting this option to a non-negative integer, you can control the maximum number of times that subintervals are divided.





Specifies the type of axes, one of: boxed, frame, none, or normal.





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=t or axis[dir]=t


Specifies information about the x-axis and y-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 (x-axis) or 2 (y-axis).  For details, see plot/axis.





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.


Note: This option is only available in the Standard interface.  In the Classic interface, the coordinates are always Cartesian.





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.





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.





This option defines the font for a plot caption, specified in the same manner as font. This option overrides values specified for font.



color=n or colour=n


Allows you to specify the color of the curves to be plotted. For details, see plot/color.



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=[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.





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.





Allows detection of discontinuities. For details, see plot/discont.



filled=truefalse or list


If the filled option is set to true, the area between the curve and the x-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.





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 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.





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.



labels=[x, y]


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.



labeldirections=[x, y]


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.





Font for the labels on the axes of the plot, specified in the same manner as font. This option overrides values specified for font.





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.





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.





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.





Specifies the minimum number of points to be generated.  The default is 200.  Note: plot employs an adaptive plotting scheme which automatically does more work where the function values do not lie close to a straight line.  Hence, plot often generates more than the minimum number of points.





Sets the horizontal display resolution of the device in pixels (the default is n=800).  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.)





A list of numerical values which is to be used for the initial sampling of the function. 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.





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.





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 (12+125).





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.





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 for points in the plot, where the value s is one of asterisk, box, circle, cross, diagonalcross, diamond, point, solidbox, solidcircle, soliddiamond.





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.





This option specifies the thickness of lines in the plot. The thickness n must be a non-negative integer; a value of 0 produces the thinnest line possible. The default value is 1.



tickmarks=[m, n]


The values m and n specify the tickmark placement for the x-axis and y-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.





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.





Font for the title of the plot, specified in the same manner as font. This option overrides values specified for font.





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.''





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=[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.  



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.


Simple Example


This example uses the title and titlefont options:




titlefont = ["ROMAN", 15]

plotsinx,x=2π..2π,title=Sine Graph,titlefont=ROMAN,15

Setting Axes and Graph Properties 1


This example uses the following axes and graph properties:




axes = framed


style = point


symbol = asterisk


symbolsize = 15


tickmarks = [spacing (Pi), default]

plotcosx,x=2π..2π,title=Cosine Graph,axes=framed,style=point,symbol=asterisk,symbolsize=15,tickmarks=spacingπ,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])

plotsin,cos,π..π,title=Simple Trig Functions,legend=Sine Plot,Cosine Plot,titlefont=ARIAL,15,labels=x values,y values,labeldirections=horizontal,vertical,labelfont=HELVETICA,10,linestyle=solid,longdash,axesfont=HELVETICA,ROMAN,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]


See Also

ColorTools[Color], discont, fdiscont, Interactive Plot Builder, plot, plot/axis, plot/color, plot/colorscheme, plot/coords, plot/interface, plot/structure, plot/style, plot/tickmarks, plot/typesetting, plots[contourplot], plots[implicitplot], plots[listcontplot], plots[setoptions]

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam