Use this procedure to display an x,y plot in a new ENVI Classic plot window. Depending on the dimensions of the y array, one or more plots display.

Syntax


ENVI_PLOT_DATA, X, Y [, BASE=variable] [, GROUP=value] [, PLOT_COLORS=array] [, PLOT_NAMES=string array] [, PLOT_STYLES=array] [, PLOT_TITLE=string] [, TITLE=string] [, XOFF=integer] [, XTITLE=string] [, YOFF=integer] [, YTITLE=string]

Arguments


X

This is an array of N points representing the x values to plot.

Y

This is an array with dimensions [N, number of plots] representing the y values to plot.

Keywords


BASE (optional)

Use this keyword to specify a named variable that contains the returned widget base of the plot window.

GROUP (optional)

Use this keyword to specify the group leader for this widget. The default is the ENVI Classic main base, which removes the plot window when you exit ENVI Classic.

PLOT_COLORS (optional)

Use this keyword to specify the plot graphic color index. PLOT_COLORS is an array of long integers with [number of plots] elements.

PLOT_NAMES (optional)

Use this keyword to specify the plot names. PLOT_NAMES is a string array with [number of plots] elements.

PLOT_STYLES (optional)

Use this keyword to specify the plot styles. PLOT_STYLES is an array of long integers with the form [number of plots], specifying the style index. Set this keyword to one of the following values:

  • 0: Solid
  • 1: Dotted
  • 2: Dashed
  • 3: Dash dot
  • 4: Dash dot dot dot
  • 5: Long dashes

PLOT_TITLE (optional)

Use this keyword to specify the plot title. PLOT_TITLE is a string.

TITLE (optional)

Use this keyword to specify the plot window title. The default is 'ENVI Classic Plot Window'.

XOFF (optional)

Use this keyword to specify the x offset (in pixels) of the upper-left corner of the plot window relative to the upper-left corner of the screen. If you do not specify XOFF, the plot window is centered horizontally on the screen.

XTITLE (optional)

Use this keyword to specify the x-axis title.

YOFF (optional)

Use this keyword to specify the y offset (in pixels) of the upper-left corner of the plot window relative to the upper-left corner of the screen. If you do not specify YOFF, the plot window is centered vertically on the screen.

YTITLE (optional)

Use this keyword to specify the y-axis title.

Example


The example plot creates a plot window with two plots.

x = findgen(100)
y = reform([x, sin(x)], 100, 2)
plot_names = ['XY Line', 'SIN(X)']
envi_plot_data, x, y, plot_names=plot_names

API Version


4.2