8.16.0.4
8 Plot and Renderer Parameters🔗ℹ
Link to this section with
@secref["params" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["params" #:doc '(lib "plot/scribblings/plot.scrbl")]
8.1 Compatibility🔗ℹ
Link to this section with
@secref["Compatibility" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Compatibility" #:doc '(lib "plot/scribblings/plot.scrbl")]
8.2 Output🔗ℹ
Link to this section with
@secref["Output" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Output" #:doc '(lib "plot/scribblings/plot.scrbl")]
Users of command-line Racket, which cannot display image snips, should enter
The width and height of a plot, in logical drawing units (e.g. pixels for bitmap plots).
Used for default arguments of plotting procedures such as
plot and
plot3d.
8.3 General Appearance🔗ℹ
Link to this section with
@secref["General_Appearance" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["General_Appearance" #:doc '(lib "plot/scribblings/plot.scrbl")]
Controls the aspect ratio of the plot area, independently from the width and
height of the entire plot.
When the aspect ratio is #f, the plot area fill fill the entire
area of the plot, leaving room only for the axis labels and title.
When an aspect ratio is a positive number, the plot area will maintain this
aspect ratio, possibly leaving empty areas around the plot.
This feature is useful when the aspect ratio needs to be maintained for the
plot output to look correct, for example when plotting a circle:
Added in version 8.1 of package plot-gui-lib.
Title and near axis labels.
A
#f value means the label is not drawn and takes no space.
A
"" value effectively means the label is not drawn, but it takes space.
Used as default keyword arguments of plotting procedures such as
plot and
plot3d.
Far axis labels.
A
#f value means the label is not drawn and takes no space.
A
"" value effectively means the label is not drawn, but it takes space.
See
plot-x-ticks for a discussion of near and far axes.
The angle and altitude of the camera in rendering 3D plots, in degrees.
Used as default keyword arguments of plotting procedures such as
plot3d.
Amount of ambient light, and whether 3D plots are rendered with diffuse and specular reflectance.
The width of the lines used to draw plot axes and other non-renderer
elements.
The line width for plot renderers, such as function and
lines, is controlled by the line-width parameter.
The cap of the lines used to draw plot axes and other non-renderer elements.
See also
line-cap.
Added in version 8.10 of package plot-gui-lib.
The amount of space around the plot to leave unused, when calculating plot
layouts for ticks and axis labels. The parameter can be specified as a
single value, which applies to all sides of the plot image, or as a list of
four separate values for the left, right, top, and bottom margins of the
plot image.
One example use for this parameter is to avoid clipping tick marks when
lines for plot elements are very thick, see plot-line-width and
line-width. In such a case, the end of axis ticks can be drawn
beyond the end point of the line, and might be clipped at the edge of the
drawing region. A non-zero plot-inset value can be used to avoid
this clipping.
See also plot-legend-padding for an equivalent setting for the plot
legend.
Added in version 8.11 of package plot-gui-lib.
The plot foreground and background color.
That both are
0 by default is not a mistake: for foreground colors,
0 is interpreted as black; for background colors,
0 is interpreted as white.
See
->pen-color and
->brush-color for details on how Plot interprets integer colors.
The opacity of the background and foreground colors.
The font size (in drawing units), face, and family of the title, axis labels, tick labels, and other labels.
The font size (in drawing units), face, and family to prefer for the legend text. If set to #f, then the corresponding plot-font-X parameter is used.
The placement of the legend and the opacity of its background.
Defines the way in which individual entries are placed in the legend. This is a list of three
elements:
the placement direction ('columns or 'rows)
the number of columns or rows
whether all the entries will have the same size ('equal-size),
or the entries will only occupy the minimum size ('compact)
For example, the value '(columns 1 equal-size) will place the legend entries vertically from
top to bottom and all entries will have the same height. A value of '(rows 2 'compact) will
place legend entries horizontally on two rows – this type of layout is useful when the legend is
placed at the top or bottom of the plot.
Added in version 7.9 of package plot-gui-lib.
The amount of space to add between the legend entries and the border drawn
around the legend. The parameter can be specified as a single value, which
applies to all sides, or as a list of four separate values for the left,
right, top, and bottom sides of the legend.
One example use for this parameter is to avoid clipping thick lines used in
legend entries, see plot-line-width and line-width. In
such a case, the end of the lines can be drawn outside the border of the
legend, a non-zero plot-legend-padding value can be used to avoid
this situation.
See also plot-inset for a similar setting for the entire plot
image.
Added in version 8.11 of package plot-gui-lib.
The length of tick lines, in drawing units.
Anchor and angles for axis tick labels (2D only).
Angles are in degrees.
The anchor refers to the part of the label attached to the end of the tick line.
Set these when labels would otherwise overlap; for example, in histograms with long category names.
When any of these is #f, the corresponding axis is not drawn.
Use these along with x-axis and y-axis renderers if you want axes that intersect the origin or some other point.
When any of these is
#f, the corresponding labels for the ticks on the axis are not drawn.
These parameters work together with the parameters like
plot-x-axis? that control the drawing of the axes; i.e. tick labels won’t be drawn unless the axis itself is drawn.
When #t, certain renderers draw simplified plots to speed up drawing.
Plot sets it to #t, for example, when a user is clicking and dragging a 3D plot to rotate it.
Given a number of samples, returns the number of samples to use.
This returns
samples when
plot-animating? is
#f.
When #f, axes, axis labels, ticks, tick labels, and the title are not drawn.
Specify the color maps to be used by
->pen-color and
->brush-color respectively, for converting integer values into RGB
triplets, or when integer values are used with the
#:color keyword of
various plot renderers. You can determine the list of available color map
names using
color-map-names.
If name is not a valid color map name, the internal color map will be
used, this is the same as specifying #f.
When the color map value is set to #f, internal color maps will be
used, one for pen and one for brush colors. The internal color map used for
pen colors has darker and more saturated colors than the one used for brush
colors. These colors are chosen for good pairwise contrast, especially
between neighbors and they repeat starting with 128.
The color maps available by default are shown below and additional ones can be
added using register-color-map:

Added in version 7.3 of package plot-gui-lib.
8.4 Lines🔗ℹ
Link to this section with
@secref["Lines" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Lines" #:doc '(lib "plot/scribblings/plot.scrbl")]
The pen color, pen width, pen style, pen cap and opacity of lines in plots.
Except for line-cap, all other parameters are used as default
keyword arguments of function, inverse, lines,
parametric, polar, density, isoline,
lines3d, parametric3d and isoline3d.
The line-cap parameter applies to lines drawn by renderers in a
plot. See also plot-line-cap.
Added in version 8.10 of package plot-gui-lib.
8.5 Intervals🔗ℹ
Link to this section with
@secref["Intervals" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Intervals" #:doc '(lib "plot/scribblings/plot.scrbl")]
8.6 Points and Point Labels🔗ℹ
Link to this section with
@secref["Points_and_Point_Labels" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Points_and_Point_Labels" #:doc '(lib "plot/scribblings/plot.scrbl")]
The symbol, and its size and opacity, used in point plots.
Used as default keyword arguments of
points and
points3d.
When any of
x-jitter,
y-jitter, or
z-jitter are non-zero,
points and
points3d will produce points randomly translated from their
original position along the x, y, or z axis, respectively.
For instance, if each parameter is set to 0.5, then
points '(0 0) will produce a random point
in a square of area 1 centered at
'(0 0).
Likewise
points3d will make a random point within a unit cube centered at
'(0 0 0).
8.7 Vector Fields & Arrows🔗ℹ
Link to this section with
@secref["Vector_Fields___Arrows" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Vector_Fields___Arrows" #:doc '(lib "plot/scribblings/plot.scrbl")]
The default pen color, pen width, pen style, and opacity used by
arrows and
arrows3d.
Added in version 7.9 of package plot-gui-lib.
The default size and angle of the arrow head in
vector-field,
vector-field3d,
arrows and
arrows3d.
When the
arrow-head-size-or-scale is a number, it is interpreted as a proportion of the arrow length , and will be bigger for longer arrows. When it is in the form
(list '= size), it is interpreted as the size of the arrow head in drawing units (pixels).
Added in version 7.9 of package plot-gui-lib.
8.8 Error Bars🔗ℹ
Link to this section with
@secref["Error_Bars" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Error_Bars" #:doc '(lib "plot/scribblings/plot.scrbl")]
The default width, pen color/width/style, and opacity used by
error-bars.
8.9 Candlesticks🔗ℹ
Link to this section with
@secref["Candlesticks" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Candlesticks" #:doc '(lib "plot/scribblings/plot.scrbl")]
The default width, pen color/width/style, and opacity used by
candlesticks. Both the up (a candle whose
open value is lower than its close value) color and the down (a candle whose open value is higher than its close
value) color can be specified independently. The width parameter will be important to specify if your x-axis is
in units like days, weeks, or months. Because dates are actually represented as seconds from an epoch, your
width should take that into consideration. For example, a width of 86400 may be useful for x-axis values in days
as there are 86400 seconds in a day. This candle will be exactly one day in width.
8.10 Color fields🔗ℹ
Link to this section with
@secref["Color_fields" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Color_fields" #:doc '(lib "plot/scribblings/plot.scrbl")]
The default sample rate and opacity used by
color-field.
Added in version 7.9 of package plot-gui-lib.
8.11 Contours and Contour Intervals🔗ℹ
Link to this section with
@secref["Contours_and_Contour_Intervals"
#:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Contours_and_Contour_Intervals"
#:doc '(lib "plot/scribblings/plot.scrbl")]
The opacities of
lines in contour plots.
Used as a default keyword argument in
contours and
contours3d.
8.12 Contour Surfaces🔗ℹ
Link to this section with
@secref["Contour_Surfaces" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Contour_Surfaces" #:doc '(lib "plot/scribblings/plot.scrbl")]
The pen colors, widths, and styles of the sampling grid, where it intersects contour intervals.
Used as default keyword arguments of
contour-intervals3d.
8.13 Rectangles🔗ℹ
Link to this section with
@secref["Rectangles" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Rectangles" #:doc '(lib "plot/scribblings/plot.scrbl")]
The default pen width of 3D rectangle edges is narrower for aesthetic reasons.
8.14 Non-Border Axes🔗ℹ
Link to this section with
@secref["Non-Border_Axes" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Non-Border_Axes" #:doc '(lib "plot/scribblings/plot.scrbl")]
Number of polar axes, whether radius ticks (i.e. lines) are drawn, whether labels are drawn, and opacity.
Used as default keyword arguments of
polar-axes.
8.15 Surfaces🔗ℹ
Link to this section with
@secref["Surfaces" #:doc '(lib "plot/scribblings/plot.scrbl")]
Link to this section with
@secref["Surfaces" #:doc '(lib "plot/scribblings/plot.scrbl")]
Surface brush color/style, pen color/width/style of the sampling grid where it intersects the surface, and opacity.
Used as default keyword arguments of
surface3d,
polar3d and
isosurface3d.
The number, brush colors/styles, pen colors/widths/styles, grid color/widths/styles, and opacities of
nested isosurfaces.
Used as default keyword arguments of
isosurfaces3d.