Draw Rectangle

Draw a rectangle, in data coordinates.

Places a rectangle on the plot, by specifying the X and Y location of the lower-left corner, along with width and height. This VI may also be used with polar plots, in which case the “rectangle” is a wedge.

int32_in int32_out Plot ID/Plot ID Out
Plot identifier. Plot ID Out always contains the same value as Plot ID.
double_in X Position
X position of the lower-left corner of the rectangle.
double_in Y Data
Y position of the lower-left corner of the rectangle.
double_in Width
Rectangle width.
double_in Height
Rectangle height.
rectangle_props Properties

Property cluster, available under the “Properties” subpalette.

uint32_in Color
Fill color for the rectangle. Defaults to light-grey.
cluster_in Line

Controls the appearance of the rectangle edge.

enum_in Style
Line style (solid, dashed, etc.). Default is to automatically select an appropriate style.
uint32_in Color
Line color. May be a PlotColor or LabView color.
single_in Width
Line width, in font points (1/72 inch).
cluster_in Display

Controls general appearance of the rectangle.

double_in Alpha
Alpha blending value for this object (0.0 to 1.0). Default is 1.0 (fully opaque).
double_in Z Order
Stacking order. Default is chosen based on the object type.
error_in error_out Error In/Out
Terminals for standard error functionality.


Download Shapes.vi, or see Examples for a complete list of examples.


Axis Types

This VI supports both polar and rectanguar axes, as well as linear and log scales. However, use with symlog scales is not currently supported, and will result in error 402906 - Operation Not Supported for Axis Scale.

Other information

If X Position or Y Position is non-finite, no rectangle is drawn. If Width or Height is non-finite or zero, no rectangle is drawn. Negative heights and widths are permitted.