Line Plot

Make a line plot.

A line plot consists of a number of data points joined by a line. By default, only the line is shown; markers for the individual points are not.

Y Data is the only required input, and is a 1D array with the Y locations of the data points. If the optional X Data is not provided, an integer series 0..N-1 will be used, where N is the number of elements in Y Data.

Markers may be shown by setting Marker.Style to something other than Automatic, such as Square, Circle, etc. By default, the line and markers have the same color, determined by The Automatic Color Cycle.

../_images/Line.png
int32_in int32_out Plot ID/Plot ID Out
Plot identifier. Plot ID Out always contains the same value as Plot ID.
double_1d_in X Data
Optional X locations of the data points. Defaults to 0..N-1.
double_1d_in Y Data
Y locations of the data points.
string_in Legend Title
Title to be displayed if a legend is added to the plot.
line_props Properties

Property cluster, available under the “Properties” subpalette.

cluster_in Line

Controls the appearance of the line.

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 Marker

Controls the appearance of the data markers. By default, they are not shown; specify Marker.Style to change this.

enum_in Style
Type of marker (circle, square, etc.). Default is to select an appropriate marker.
uint32_in Color
Marker color. May be a PlotColor or LabView color.
single_in Size
Area of marker, in square points.
cluster_in Display

Controls general appearance of the line plot.

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.

Example

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

../_images/LineExample.png

Axis Types

This VI supports both rectangular and polar axes.

Other information

If Y Data is empty, no plot is made but the color cycle is advanced.

If a non-finite entry (NaN or Inf) appears in X Data or Y Data, the corresponding point will not be displayed.

If X Data and Y Data are different sizes, only the overlap will be displayed. If X Data is empty, the default (0..N-1) values will be used.