Credits Overview Plotting Styles Commands Terminals

object

The set object command defines a single object which will appear in subsequent plots. You may define as many objects as you like. Currently the supported object types are rectangle, circle, ellipse, and polygon. Rectangles inherit a default set of style properties (fill, color, border) from those set by the command set style rectangle, but each object can also be given individual style properties. Circles, ellipses, and polygons inherit the fill style from set style fill. Objects to be drawn in 2D plots may be defined in any combination of axis, graph, polar, or screen coordinates.

Object specifications in 3D plots cannot use graph coordinates. Rectangles and ellipses in 3D plots are limited to screen coordinates.

Syntax:

    set object <index>
        <object-type> <object-properties>
        {front|back|behind|depthorder}
        {clip|noclip}
        {fc|fillcolor <colorspec>} {fs <fillstyle>}
        {default} {lw|linewidth <width>} {dt|dashtype <dashtype>}
    unset object <index>

<object-type> is either rectangle, ellipse, circle, or polygon. Each object type has its own set of characteristic properties.

The options front, back, behind control whether the object is drawn before or after the plot itself. See layers. Setting front will draw the object in front of all plot elements, but behind any labels that are also marked front. Setting back will place the object behind all plot curves and labels. Setting behind will place the object behind everything including the axes and back rectangles, thus

    set object rectangle from screen 0,0 to screen 1,1 behind

can be used to provide a colored background for the entire graph or page.

By default, objects are clipped to the graph boundary unless one or more vertices are given in screen coordinates. Setting noclip will disable clipping to the graph boundary, but will still clip against the screen size.

The fill color of the object 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 at the time a plot is drawn. See set style rectangle.

Subtopics