#### 3.25.47.1 rectangle

Syntax:

        set object <index> rectangle
            {from <position> {to|rto} <position> |
             center <position> size <w>,<h> |
             at <position> size <w>,<h>}

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.

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 rgb "blue"

        # Return fill and color to the default style but leave vertices unchanged
        set object 2 rect default

Rectangle corners specified in screen coordinates may extend beyond the edge of the current graph. Otherwise the rectangle is clipped to fit in the graph.