Filled Contour Plot

Make a filled contour plot.

Rather than having discrete contour lines, “filled” contour plots shade the regions between contours according to a colormap. Contour lines themselves are not plotted. Use Contour Plot in combination with this VI to display lines.

The default colormap (Colormap.Map) is Rainbow.

This is a polymorphic VI; you can choose between automatically generating a specific number of contour levels (Filled Contour Plot (Automatic)) and manually specifying the contour levels you want (Filled Contour Plot (Manual)).

Data must be of shape 2x2 or larger to make a filled contour plot.

Filled Contour Plot (Automatic)

Make a filled contour plot, with N automatically chosen levels. Note that since you specify the number of levels (boundaries between regions), the number of shaded regions displayed is N+1.

../_images/ContourFilled_Automatic.png
int32_in int32_out Plot ID/Plot ID Out
Plot identifier. Plot ID Out always contains the same value as Plot ID.
double_2d_in Z Data
2-D array for which to generate contours. The first (slowest-varying) dimension is plotted along the Y axis; the second (fastest-varying) dimension is plotted along with X axis.
double_1d_in X Coordinates
Optional 1-D array giving X axis coordinates. Defaults to 0..NX-1, where NX is the size of Z Data‘s second dimension.
double_1d_in Y Coordinates
Optional 1-D array giving Y axis coordinates. Defaults to 0..NY-1, where NY is the size of Z Data‘s first dimension.
int32_in Levels
Number of contours to automatically generate (default 10). You can also set the min and max data value to contour via the Contour Range terminal.
cluster_in Contour Range

Controls the limits within which contours will be plotted.

double_in Min Level
Only plot contour levels for data with this value or higher.
double_in Max Level
Only plot contour levels for data with this value or lower.
contourfilled_props Properties

Property cluster, available under the “Properties” subpalette.

cluster_in Colormap

Controls the colormap used to display the regions.

enum_in Map
Colormap to use. See Colormaps for more info.
double_in Value Min
Lower range for colormapped data; values smaller than this will all be plotted with the first color in the colormap.
double_in Value Max
Upper range for colormapped data; values larger than this will all be plotted with the last color in the colormap.
enum_in Scaling
Colormap scaling mode. Currently only linear scaling is supported.
bool_in Reverse
Flip the colormap; for example, if a map has 0.0 as black and 1.0 as white, this will assign 0.0 as white and 1.0 as black.
cluster_in Display

Controls the overall appearance of the contour 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.

Filled Contour Plot (Manual)

Make a filled contour plot, with explicitly specified levels. Note that since you specify the levels (boundaries between regions), the number of shaded regions displayed is N+1.

../_images/ContourFilled_Manual.png
int32_in int32_out Plot ID/Plot ID Out
Plot identifier. Plot ID Out always contains the same value as Plot ID.
double_2d_in Z Data
2-D array for which to generate contours. The first (slowest-varying) dimension is plotted along the Y axis; the second (fastest-varying) dimension is plotted along with X axis.
double_1d_in X Coordinates
Optional 1-D array giving X axis coordinates. Defaults to 0..NX-1, where NX is the size of Z Data‘s second dimension.
double_1d_in Y Coordinates
Optional 1-D array giving Y axis coordinates. Defaults to 0..NY-1, where NY is the size of Z Data‘s first dimension.
double_1d_in Levels
Values at which to draw region boundaries.
contourfilled_props Properties

Property cluster, available under the “Properties” subpalette.

cluster_in Colormap

Controls the colormap used to display the regions.

enum_in Map
Colormap to use. See Colormaps for more info.
double_in Value Min
Lower range for colormapped data; values smaller than this will all be plotted with the first color in the colormap.
double_in Value Max
Upper range for colormapped data; values larger than this will all be plotted with the last color in the colormap.
enum_in Scaling
Colormap scaling mode. Currently only linear scaling is supported.
bool_in Reverse
Flip the colormap; for example, if a map has 0.0 as black and 1.0 as white, this will assign 0.0 as white and 1.0 as black.
cluster_in Display

Controls the overall appearance of the contour 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 Contour Plot (Filled).vi, or see Examples for a complete list of examples.

../_images/ContourFilledExample.png

Axis Types

Both Filled Contour Plot (Automatic) and Filled Contour Plot (Manual) may be used with rectangular axes only. Use with polar axes will result in 402905 - Operation Not Supported for Polar Plot. Likewise, only linear scales are supported. Use with log or symlog axes will result in 402906 - Operation Not Supported for Axis Scale.

Other information

If an empty Z Data array is provided, or an array smaller than 2x2, both VIs do nothing.

If Levels (Automatic) is 0, or (Manual) has no elements elements, no plot will be made. A negative value (Automatic) will result in the default number of contour levels being displayed. The maximum number of levels is 500. Requests for more than 500 levels will be silently clipped to 500 (Automatic), or the first 500 elements of the levels array (Manual).

If a non-finite value appears in X Coordinates or Y Coordinates, the corresponding row or column of Z Data is not displayed.

If the size of X Coordinates or Y Coordinates does not match the size of the corresponding axis for Z Data, only the overlap is displayed. A zero-sized array for either will result in the default coordinates being used (0..N-1).

A non-finite value for Contour Range.Min Level or Contour Range.Max Level will result in the default value (min or max of Z Data) being used.

A non-finite value in Z Data will appear as a “hole” or blank patch in the shaded contours.