2.21.54 object
This command defines a single object, which will appear in all subsequent
2D plots. You may define as many objects as you like. Currently the only
object type supported is `rectangle`.
Each rectangle is specified by a pair of points that define diagonal vertices.
A default set of style properties (fill, color, border) are inherited from
those set by the command `set style rectangle`, but each rectangle can also be
given individual style properties.
Syntax:
| set object <index> rectangle
{from <position> {to|rto} <position> |
center <position> size <w>,<h> |
at <position> size <w>,<h>}
{front|back|behind} {fc|fillcolor <colorspec>} {fs <fillstyle>}
{default} {lw|linewidth <width>}
|
The position of the rectangle may be specified by giving the position of two
diagonal corners (bottom left and top right) or by giving the position of the
center followed by the width and the height. In either case the positions
may be given in axis, graph, or screen coordinates. See `coordinates`.
The options `at` and `center` are synonyms.
Setting `front` will draw the rectangle in front of all plot elements, but
behind any labels that are also marked `front`. Setting `back` will place the
rectangle behind all plot curves and labels. Setting `behind` will place the
rectangle behind everything including the axes and `back` rectangles, and can
be used to provide a colored background for the entire graph or page.
The fill color of the rectangle is taken from the <colorspec>. `fillcolor`
may be abbreviated `fc`. The fill style is taken from <fillstyle>.
See colorspec and `fillstyle`. If the keyword `default` is given,
these properties are inherited from the default settings of at the time a plot
is drawn. See `set style rectangle`.
Examples:
| # Force the entire area enclosed by the axes to have background color cyan
set object 1 rect from graph 0, graph 0 to graph 1, graph 1 back
set object 1 rect fc rgb "cyan" fillstyle solid 1.0
|
| # Position a red square with lower left at 0,0 and upper right at 2,3
set object 2 rect from 0,0 to 2,3 fc lt 1
|
| # Position an empty rectangle (no fill) with a blue border
set object 3 rect from 0,0 to 2,3 fs empty border 3
|
| # Return fill and color to the default style but leave vertices unchanged
set object 2 rect default
|