Plot Axis Options - Maple Programming Help

Home : Support : Online Help : Graphics : 3-D : Options : plot/axis

Plot Axis Options

 Calling Sequence plotcommand(plotargs, axis=t) plotcommand(plotargs, axis[dir]=t)

Parameters

 plotargs - arguments to a plotting command axis=t - axis information to be applied to all axes, where t is a list of suboptions axis[dir]=t - axis information, where dir is the value 1, 2, 3 or a sequence of two of these values, and t is a list of suboptions

Description

 • The axis and axis[dir] options allow you to provide information about one or more axes to plotting commands such as plot and plot3d. The information may include, for example, the axis color, locations of tickmarks and gridlines, and use of logarithmic scaling.
 • With the axis=t option, the information provided in t is applied to all the axes.  With the axis[dir]=t option, t is used for only the direction(s) specified in dir, which can be the single value 1 (x-axis), 2 (y-axis) or 3 (z-axis), or a sequence of two of these values.  Multiple axis[dir] options, with different values of dir, may be used to specify different information for different axes. The commands for 2-D plotting do not accept the axis[3] option.
 • The axis information is given by t.  The list t may contain one or more of the suboptions described in the following section.
 • Other options available for 2-D and 3-D plotting are described in the plot/options and plot3d/option help pages, respectively.

Suboptions for the axis Option

 • color=c or colour=c
 Specify the color of the axis.  See the plot/color help page for a description of the values that c can take. The default is black.
 • gridlines or gridlines=g
 Specify appearance of gridlines.  This option is available for 2-D plotting only.  If gridlines or gridlines=default is provided, then default gridlines are drawn.
 The value g may be an integer specifying the number of gridlines, a list of values specifying locations, a list of equations each having the form location=label, or a spacing structure.  For more details, see plot/tickmarks.
 The value g can also be a list containing one of the above forms, followed by one or more suboptions.  The suboptions that may be provided with the gridlines option are color, linestyle, majorlines, subticks, and thickness. For more information on how to specify these suboptions, see plot/tickmarks.
 • location=k
 Specifies the location of the axis.  The value k can be low, meaning the lowest value of the view range; origin, meaning the origin (or the closest value if the origin is not in the view range);  or high, meaning the highest value of the view range. The default value depends on the axes style.
 • mode=m
 Specify the scaling used for the axis.  The value m can be the name linear, for linear scaling, or log, for logarithmic scaling.  The default value is linear.
 • thickness=n
 Specify the thickness of the axis. The thickness n must be a non-negative integer; a value of 0 produces the thinnest line possible. The default value is 1.
 • tickmarks
 Specify appearance of tickmarks.  Tickmarks are specified in the same way as gridlines.  See the entry for the gridlines option above. More information is available on the plot/tickmarks help page.

Notes

 • The axis option is not available for all interfaces.  For more information, see plot/interface.

Examples

 > $\mathrm{plot}\left(x,x=0..1,\mathrm{axis}=\left[\mathrm{gridlines}=\left[10,\mathrm{color}=\mathrm{blue}\right]\right]\right)$
 > $\mathrm{plot}\left(x,x=0..1,{\mathrm{axis}}_{1}=\left[\mathrm{gridlines}=\left[10,\mathrm{thickness}=2,\mathrm{subticks}=\mathrm{false},\mathrm{color}=\mathrm{blue}\right]\right]\right)$
 > $\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..2\mathrm{π},{\mathrm{axis}}_{2}=\left[\mathrm{gridlines}=\left[\mathrm{linestyle}=\mathrm{dot}\right]\right]\right)$
 > $\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..2\mathrm{π},\mathrm{axis}=\left[\mathrm{gridlines}=\left[\mathrm{colour}=\mathrm{green},\mathrm{majorlines}=2\right]\right]\right)$
 > $\mathrm{plot3d}\left(xy,x=1..10,y=1..10,\mathrm{axes}=\mathrm{normal},{\mathrm{axis}}_{3}=\left[\mathrm{mode}=\mathrm{log},\mathrm{color}=\mathrm{red}\right]\right)$
 > $\mathrm{plot3d}\left(x+y,x=1..10,y=1..10,\mathrm{axes}=\mathrm{boxed},{\mathrm{axis}}_{1,2}=\left[\mathrm{mode}=\mathrm{log}\right]\right)$