Plotting Options (Maxima 5.46.0 Manual)

Next: Gnuplot Options, Previous: Functions and Variables for Plotting, Up: Plotting [Contents][Index]

### 12.4 Plotting Options

All options consist of a list starting with one of the keywords in this section, followed by one or more values. If the option appears inside one of the plotting commands, its value will be local for that command. It the option is given as argument to `set_plot_option`, its value will be global and used in all plots, unless it is overridden by a local value.

Some of the options may have different effects in different plotting commands as it will be pointed out in the following list. The options that accept among their possible values true or false, can also be set to true by simply writing their names, and false by writing their names with the prefix no. For instance, typing `logx` as an option is equivalent to writing `[logx, true]` and `nobox` is equivalent to `[box, false]`. When just the name of the option is used for an option which cannot have a value `true`, it means that any value previously assigned to that option will be removed, leaving it to the graphic program to decide what to do.

Plot option: adapt_depth [adapt_depth, integer] ¶

  Default value: `5`

  The maximum number of splittings used by the adaptive plotting routine of `plot2d`; integer must be a non-negative integer. A value of zero means that adaptive plotting will not be used and the resulting plot will have 1+4*nticks points (see option `nticks`). To have more control on the number of points and their positions, a list of points can be created and then plotted using the `discrete` method of `plot2d`.

  Categories: Plotting ·

Plot option: axes [axes, symbol], axes, noaxes ¶

  Default value: `true`

  Where symbol can be either `true`, `false`, `x`, `y` or `solid`. If `false`, no axes are shown; if equal to `x` or `y` only the x or y axis will be shown; if it is equal to `true`, both axes will be shown and `solid` will show the two axes with a solid line, rather than the default broken line. This option does not have any effect in the 3 dimensional plots. The single keywords `axes` and `noaxes` can be used as synonyms for `[axes, true]` and `[axes, false]`.

  Categories: Plotting ·

Plot option: azimuth [azimuth, number] ¶

  Default value: `30`

  A plot3d plot can be thought of as starting with the x and y axis in the horizontal and vertical axis, as in plot2d, and the z axis coming out of the screen. The z axis is then rotated around the x axis through an angle equal to `elevation` and then the new xy plane is rotated around the new z axis through an angle `azimuth`. This option sets the value for the azimuth, in degrees.

  See also `elevation`.

  Categories: Plotting ·

Plot option: box [box, symbol], box, nobox ¶

  Default value: `true`

  If set to `true`, a bounding box will be drawn for the plot; if set to `false`, no box will be drawn. The single keywords `box` and `nobox` can be used as synonyms for `[box, true]` and `[box, false]`.

  Categories: Plotting ·

Plot option: color [color, color_1, …, color_n] ¶

  In 2d plots it defines the color (or colors) for the various curves. In `plot3d`, it defines the colors used for the mesh lines of the surfaces, when no palette is being used.

  If there are more curves or surfaces than colors, the colors will be repeated in sequence. The valid colors are `red`, `green`, `blue`, `magenta`, `cyan`, `yellow`, `orange`, `violet`, `brown`, `gray`, `black`, `white`, or a string starting with the character # and followed by six hexadecimal digits: two for the red component, two for green component and two for the blue component. If the name of a given color is unknown color, black will be used instead.

  Categories: Plotting ·

Plot option: color_bar [color_bar, symbol], color_bar, nocolor_bar ¶

  Default value: `false` in plot3d, `true` in mandelbrot and julia

  Where symbol can be either `true` or `false`. If `true`, whenever `plot3d`, `mandelbrot` or `julia` use a palette to represent different values, a box will be shown on the right, showing the corresponding between colors and values. The single keywords `color_bar` and `nocolor_bar` can be used as synonyms for `[color_bar, true]` and `[color_bar, false]`.

  Categories: Plotting ·

Plot option: color_bar_tics [color_bar_tics, x1, x2, x3], color_bar_tics, nocolor_bar_tics ¶

  Defines the values at which a mark and a number will be placed in the color bar. The first number is the initial value, the second the increments and the third is the last value where a mark is placed. The second and third numbers can be omitted. When only one number is given, it will be used as the increment from an initial value that will be chosen automatically. The single keyword `color_bar_tics` removes a value given previously, making the graphic program use its default for the values of the tics and `nocolor_bar_tics` will not show any tics on the color bar.

  Categories: Plotting ·

Plot option: elevation [elevation, number] ¶

  Default value: `60`

  A plot3d plot can be thought of as starting with the x and y axis in the horizontal and vertical axis, as in plot2d, and the z axis coming out of the screen. The z axis is then rotated around the x axis through an angle equal to `elevation` and then the new xy plane is rotated around the new z axis through an angle `azimuth`. This option sets the value for the elevation, in degrees.

  See also `azimuth`.

  Categories: Plotting ·

Plot option: grid [grid, integer, integer] ¶

  Default value: `30`, `30`

  Sets the number of grid points to use in the x- and y-directions for three-dimensional plotting or for the `julia` and `mandelbrot` programs.

  For a way to actually draw a grid See `grid2d`.

  Categories: Plotting ·

Plot option: grid2d [grid2d, value], grid2d, nogrid2d ¶

  Default value: `false`

  Shows a grid of lines on the xy plane. The points where the grid lines are placed are the same points where tics are marked in the x and y axes, which can be controlled with the `xtics` and `ytics` options. The single keywords `grid2d` and `nogrid2d` can be used as synonyms for `[grid2d, true]` and `[grid2d, false]`.

  See also `grid`.

  Categories: Plotting ·

Plot option: iterations [iterations, value] ¶

  Default value: `9`

  Number of iterations made by the programs mandelbrot and julia.

  Categories: Plotting ·

Plot option: label [label, [string, x, y], …] ¶

  Writes one or several labels in the points with x, y coordinates indicated after each label.

  Categories: Plotting ·

Plot option: legend [legend, string_1, …, string_n], legend, nolegend ¶

  It specifies the labels for the plots when various plots are shown. If there are more plots than the number of labels given, they will be repeated. If given the value `false`, no legends will be shown. By default, the names of the expressions or functions will be used, or the words discrete1, discrete2, …, for discrete sets of points. The single keyword `legend` removes any previously defined legends, leaving it to the plotting program to set up a legend. The keyword `nolegend` is a synonym for `[legend, false]`.

  Categories: Plotting ·

Plot option: levels [levels, number, …] ¶

  This option is used by `plot2d` to do contour plots. If only one number is given after the keyword `levels`, it must be a natural number; `plot2d` will try to plot that number of contours with values between the minimum and maximum value of the expression given, with the form d*10^n, where d is either 1, 2 or 5. Since not always it will be possible to find that number of levels in that interval, the number of contour lines show will be smaller than the number specified by this option.

  If more than one number are given after the keyword `levels`, `plot2d`. will show the contour lines corresponding to those values of the expression plotted, if they exist within the domain used.

  Categories: Plotting ·

Plot option: logx [logx, value], logx, nologx ¶

  Default value: `false`

  Makes the horizontal axes to be scaled logarithmically. It can be either true or false. The single keywords `logx` and `nologx` can be used as synonyms for `[logx, true]` and `[logx, false]`.

  Categories: Plotting ·

Plot option: logy [logy, value], logy, nology ¶

  Default value: `false`

  Makes the vertical axes to be scaled logarithmically. It can be either true or false. The single keywords `logy` and `nology` can be used as synonyms for `[logy, true]` and `[logy, false]`.

  Categories: Plotting ·

Plot option: mesh_lines_color [mesh_lines_color, color], mesh_lines_color, no_mesh_lines ¶

  Default value: `black`

  It sets the color used by plot3d to draw the mesh lines, when a palette is being used. It accepts the same colors as for the option `color` (see the list of allowed colors in `color`). It can also be given a value `false` to eliminate completely the mesh lines. The single keyword `mesh_lines_color` removes any previously defined colors, leaving it to the graphic program to decide what color to use. The keyword `no_mesh_lines` is a synonym for `[mesh_lines_color, false]`

  Categories: Plotting ·

Plot option: nticks [nticks, integer] ¶

  Default value: `29`

  When plotting functions with `plot2d`, it is gives the initial number of points used by the adaptive plotting routine for plotting functions. When plotting parametric functions with `plot3d`, it sets the number of points that will be shown for the plot.

  Categories: Plotting ·

Plot option: palette [palette, [palette_1], …, [palette_n]], palette, nopalette ¶

  It can consist of one palette or a list of several palettes. Each palette is a list with a keyword followed by values. If the keyword is gradient, it should be followed by a list of valid colors.

  If the keyword is hue, saturation or value, it must be followed by 4 numbers. The first three numbers, which must be between 0 and 1, define the hue, saturation and value of a basic color to be assigned to the minimum value of z. The keyword specifies which of the three attributes (hue, saturation or value) will be increased according to the values of z. The last number indicates the increase corresponding to the maximum value of z. That last number can be bigger than 1 or negative; the corresponding values of the modified attribute will be rounded modulo 1.

  Gnuplot only uses the first palette in the list; xmaxima will use the palettes in the list sequentially, when several surfaces are plotted together; if the number of palettes is exhausted, they will be repeated sequentially.

  The color of the mesh lines will be given by the option `mesh_lines_color`. If `palette` is given the value `false`, the surfaces will not be shaded but represented with a mesh of curves only. In that case, the colors of the lines will be determined by the option `color`.

  The single keyword `palette` removes any palette previously defined, leaving it to the graphic program to decide the palette to use and `nopalette` is a synonym for `[palette, false]`.

  Categories: Plotting ·

Plot option: plotepsilon [plotepsilon, value] ¶

  Default value: 1e-6

  This value is used by `plot2d` when plotting implicit functions or contour lines. When plotting an explicit function `expr_1=expr_2`, it is converted into `expr_1-expr_2` and the points where that equals zero are searched. When a contour line for `expr` equal to some value is going to be plotted, the points where `expr` minus that value are equal to zero are searched. The search is done by computing those expressions at a grid of points (see `sample`). If at one of the points in that grid the absolute value of the expression is less than the value of `plotepsilon`, it will be assumed to be zero, and therefore, as being part of the curve to be plotted.

  Categories: Plotting ·

Plot option: plot_format [plot_format, format] ¶

  Default value: `gnuplot`, in Windows systems, or `gnuplot_pipes` in other systems.

  Where format is one of the following: gnuplot, xmaxima, mgnuplot, gnuplot_pipes or geomview.

  It sets the format to be used for plotting as explained in `Plotting Formats`.

  Categories: Plotting ·

Plot option: plot_realpart [plot_realpart, symbol], plot_realpart, noplot_realpart ¶

  Default value: `false`

  If set to `true`, the functions to be plotted will be considered as complex functions whose real value should be plotted; this is equivalent to plotting `realpart(function)`. If set to `false`, nothing will be plotted when the function does not give a real value. For instance, when `x` is negative, `log(x)` gives a complex value, with real value equal to `log(abs(x))`; if `plot_realpart` were `true`, `log(-5)` would be plotted as `log(5)`, while nothing would be plotted if `plot_realpart` were `false`. The single keyword `plot_realpart` can be used as a synonym for `[plot_realpart, true]` and `noplot_realpart` is a synonym for `[plot_realpart, false]`.

  Categories: Plotting ·

Plot option: point_type [point_type, type_1, …, type_n] ¶

  In gnuplot, each set of points to be plotted with the style “points” or “linespoints” will be represented with objects taken from this list, in sequential order. If there are more sets of points than objects in this list, they will be repeated sequentially. The possible objects that can be used are: `bullet`, `circle`, `plus`, `times`, `asterisk`, `box`, `square`, `triangle`, `delta`, `wedge`, `nabla`, `diamond`, `lozenge`.

  Categories: Plotting ·

Plot option: pdf_file [pdf_file, file_name] ¶

  Saves the plot into a PDF file with name equal to file_name, rather than showing it in the screen. By default, the file will be created in the directory defined by the variable `maxima_tempdir`, unless file_name contains the character “/”, in which case it will be assumed to contain the complete path where the file should be created. The value of `maxima_tempdir` can be changed to save the file in a different directory. When the option `gnuplot_pdf_term_command` is also given, it will be used to set up Gnuplot’s PDF terminal; otherwise, Gnuplot’s pdfcairo terminal will be used with solid colored lines of width 3, plot size of 17.2 cm by 12.9 cm and font of 18 points.

  Categories: Plotting ·

Plot option: png_file [png_file, file_name] ¶

  Saves the plot into a PNG graphics file with name equal to file_name, rather than showing it in the screen. By default, the file will be created in the directory defined by the variable `maxima_tempdir`, unless file_name contains the character “/”, in which case it will be assumed to contain the complete path where the file should be created. The value of `maxima_tempdir` can be changed to save the file in a different directory. When the option `gnuplot_png_term_command` is also given, it will be used to set up Gnuplot’s PNG terminal; otherwise, Gnuplot’s pngcairo terminal will be used, with a font of size 12.

  Categories: Plotting ·

Plot option: ps_file [ps_file, file_name] ¶

  Saves the plot into a Postscript file with name equal to file_name, rather than showing it in the screen. By default, the file will be created in the directory defined by the variable `maxima_tempdir`, unless file_name contains the character “/”, in which case it will be assumed to contain the complete path where the file should be created. The value of `maxima_tempdir` can be changed to save the file in a different directory. When the option `gnuplot_ps_term_command` is also given, it will be used to set up Gnuplot’s Postscript terminal; otherwise, Gnuplot’s postscript terminal will be used with the EPS option, solid colored lines of width 2, plot size of 16.4 cm by 12.3 cm and font of 24 points.

  Categories: Plotting ·

Plot option: run_viewer [run_viewer, symbol], run_viewer, norun_viewer ¶

  Default value: `true`

  This option is only used when the plot format is `gnuplot` and the terminal is `default` or when the Gnuplot terminal is set to `dumb` (see `gnuplot_term`) and can have a true or false value.

  If the terminal is `default`, a file `maxout_xxx.gnuplot` (or other name specified with `gnuplot_out_file`) is created with the gnuplot commands necessary to generate the plot. Option `run_viewer` controls whether or not Gnuplot will be launched to execute those commands and show the plot.

  If the terminal is `default`, gnuplot is run to execute the commands in `maxout_xxx.gnuplot`, producing another file `maxplot.txt` (or other name specified with `gnuplot_out_file`). Option `run_viewer` controls whether or not that file, with an ASCII representation of the plot, will be shown in the Maxima or Xmaxima console.

  Its default value, true, makes the plots appear in either the console or a separate graphics window. `run_viewer` and `norun_viewer` are synonyms for `[run_viewer, true]` and `[run_viewer, false]`.

  Categories: Plotting ·

Plot option: same_xy [same_xy , value], same_xy, nosame_xy ¶

  It can be either true or false. If true, the scales used in the x and y axes will be the same, in either 2d or 3d plots. See also `yx_ratio`. `same_xy` and `nosame_xy` are synonyms for `[same_xy, true]` and `[same_xy, false]`.

  Categories: Plotting ·

Plot option: same_xyz [same_xyz , value], same_xyz, nosame_xyz ¶

  It can be either true or false. If true, the scales used in the 3 axes of a 3d plot will be the same. `same_xyz` and `nosame_xyz` are synonyms for `[same_xyz, true]` and `[same_xyz, false]`.

  Categories: Plotting ·

Plot option: sample [sample, nx, ny] ¶

  Default value: `[sample, 50, 50]`

  nx and ny must be two natural numbers that will be used by `plot2d` to look for the points that make part of the plot of an implicit function or a contour line. The domain is divided into nx intervals in the horizontal axis and ny intervals in the vertical axis and the numerical value of the expression is computed at the borders of those intervals. Higher values of nx and ny will give smoother curves, but will increase the time needed to trace the plot. When there are critical points in the plot where the curve changes direction, to get better results it is more important to try to make those points to be at the border of the intervals, rather than increasing nx and ny.

  Categories: Plotting ·

Plot option: style [style, type_1, …, type_n], [style, [style_1], …, [style_n]] ¶

  The styles that will be used for the various functions or sets of data in a 2d plot. The word style must be followed by one or more styles. If there are more functions and data sets than the styles given, the styles will be repeated. Each style can be either lines for line segments, points for isolated points, linespoints for segments and points, or dots for small isolated dots. Gnuplot accepts also an impulses style.

  Each of the styles can be enclosed inside a list with some additional parameters. lines accepts one or two numbers: the width of the line and an integer that identifies a color. The default color codes are: 1: blue, 2: red, 3: magenta, 4: orange, 5: brown, 6: lime and 7: aqua. If you use Gnuplot with a terminal different than X11, those colors might be different; for example, if you use the option [gnuplot_term, ps], color index 4 will correspond to black, instead of orange.

  points accepts one two or three parameters; the first parameter is the radius of the points, the second parameter is an integer that selects the color, using the same code used for lines and the third parameter is currently used only by Gnuplot and it corresponds to several objects instead of points. The default types of objects are: 1: filled circles, 2: open circles, 3: plus signs, 4: x, 5: *, 6: filled squares, 7: open squares, 8: filled triangles, 9: open triangles, 10: filled inverted triangles, 11: open inverted triangles, 12: filled lozenges and 13: open lozenges.

  linespoints accepts up to four parameters: line width, points radius, color and type of object to replace the points.

  See also `color` and `point_type`.

  Categories: Plotting ·

Plot option: svg_file [svg_file, file_name] ¶

  Saves the plot into an SVG file with name equal to file_name, rather than showing it in the screen. By default, the file will be created in the directory defined by the variable `maxima_tempdir`, unless file_name contains the character “/”, in which case it will be assumed to contain the complete path where the file should be created. The value of `maxima_tempdir` can be changed to save the file in a different directory. When the option `gnuplot_svg_term_command` is also given, it will be used to set up Gnuplot’s SVG terminal; otherwise, Gnuplot’s svg terminal will be used with font of 14 points.

  Categories: Plotting ·

Plot option: t [t, min, max] ¶

  Default range for parametric plots.

  Categories: Plotting ·

Plot option: title [title, text] ¶

  Defines a title that will be written at the top of the plot.

  Categories: Plotting ·

Plot option: transform_xy [transform_xy, symbol], notransform_xy ¶

  Where symbol is either `false` or the result obtained by using the function `transform_xy`. If different from `false`, it will be used to transform the 3 coordinates in plot3d. `notransform_xy` removes any transformation function previously defined.

  See `make_transform`, `polar_to_xy` and `spherical_to_xyz`.

  Categories: Plotting ·

Plot option: window [window, n] ¶

  Opens the plot in window number n, instead of the default window 0. If window number n is already opened, the plot in that window will be replaced by the current plot.

  Categories: Plotting ·

Plot option: x [x, min, max] ¶

  When used as the first option in a `plot2d` command (or any of the first two in `plot3d`), it indicates that the first independent variable is x and it sets its range. It can also be used again after the first option (or after the second option in plot3d) to define the effective horizontal domain that will be shown in the plot.

  Categories: Plotting ·

Plot option: xlabel [xlabel, string] ¶

  Specifies the string that will label the first axis; if this option is not used, that label will be the name of the independent variable, when plotting functions with `plot2d` the name of the first variable, when plotting surfaces with `plot3d`, or the first expression in the case of a parametric plot.

  Categories: Plotting ·

Plot option: xtics [xtics, x1, x2, x3], [xtics, `false`], xtics, noxtics ¶

  Defines the values at which a mark and a number will be placed in the x axis. The first number is the initial value, the second the increments and the third is the last value where a mark is placed. The second and third numbers can be omitted, in which case the first number is the increment from an initial value that will be chosen by the graphic program. If `[xtics, false]` is used, no marks or numbers will be shown along the x axis.

  The single keyword `xtics` removes any values previously defined, leaving it to the graphic program to decide the values to use and `noxtics` is a synonym for `[xtics, false]`

  Categories: Plotting ·

Plot option: xy_scale [xy_scale, sx, sy] ¶

  In a 2d plot, it defines the ratio of the total size of the Window to the size that will be used for the plot. The two numbers given as arguments are the scale factors for the x and y axes.

  This option does not change the size of the graphic window or the placement of the graph in the window. If you want to change the aspect ratio of the plot, it is better to use option `yx_ratio`. For instance, `[yx_ratio, 10]` instead of `[xy_scale, 0.1, 1]`.

  Categories: Plotting ·

Plot option: y [y, min, max] ¶

  When used as one of the first two options in `plot3d`, it indicates that one of the independent variables is y and it sets its range. Otherwise, it defines the effective domain of the second variable that will be shown in the plot.

  Categories: Plotting ·

Plot option: ylabel [ylabel, string] ¶

  Specifies the string that will label the second axis; if this option is not used, that label will be “y”, when plotting explicit functions with `plot2d`, or the name of the second variable, when plotting surfaces with `plot3d`, or the second expression in the case of a parametric plot.

  Categories: Plotting ·

Plot option: ytics [ytics, y1, y2, y3], [ytics, `false`], ytics, noytics ¶

  Defines the values at which a mark and a number will be placed in the y axis. The first number is the initial value, the second the increments and the third is the last value where a mark is placed. The second and third numbers can be omitted, in which case the first number is the increment from an initial value that will be chosen by the graphic program. If `[ytics, false]` is used, no marks or numbers will be shown along the y axis.

  The single keyword `ytics` removes any values previously defined, leaving it to the graphic program to decide the values to use and `noytics` is a synonym for `[ytics, false]`

  Categories: Plotting ·

Plot option: yx_ratio [yx_ratio, r] ¶

  In a 2d plot, the ratio between the vertical and the horizontal sides of the rectangle used to make the plot. See also `same_xy`.

  Categories: Plotting ·

Plot option: z [z, min, max] ¶

  Used in `plot3d` to set the effective range of values of z that will be shown in the plot.

  Categories: Plotting ·

Plot option: zlabel [zlabel, string] ¶

  Specifies the string that will label the third axis, when using `plot3d`. If this option is not used, that label will be “z”, when plotting surfaces, or the third expression in the case of a parametric plot. It can not be used with `set_plot_option` and it will be ignored by `plot2d`.

  Categories: Plotting ·

Plot option: zmin [zmin, z], zmin ¶

  In 3d plots, the value of z that will be at the bottom of the plot box.

  The single keyword `zmin` removes any value previously defined, leaving it to the graphic program to decide the value to use.

  Categories: Plotting ·

Plot option: ztics [ztics, z1, z2, z3], [ztics, `false`], ztics, noztics ¶

  Defines the values at which a mark and a number will be placed in the z axis. The first number is the initial value, the second the increments and the third is the last value where a mark is placed. The second and third numbers can be omitted, in which case the first number is the increment from an initial value that will be chosen by the graphic program. If `[ztics, false]` is used, no marks or numbers will be shown along the z axis.

  The single keyword `ztics` removes any values previously defined, leaving it to the graphic program to decide the values to use and `noztics` is a synonym for `[ztics, false]`

  Categories: Plotting ·

Next: Gnuplot Options, Previous: Functions and Variables for Plotting, Up: Plotting [Contents][Index]