Routines (alphabetical) > Routines: I > IPUTDATA

# IPUTDATA

## Syntax

IPUTDATA, Id, Data1, Data2, ... [, TOOL=iToolID]

## Arguments

### Id

A string containing the identifier of the iTools object whose data is to be replaced. If you pass a partial identifier, the IGETID function is called to retrieve the full identifier string.

### Datas

Data values to set on the object.

## Keywords

### TOOL

Set this keyword to a string specifying one or more iTools in which to search for Id. If this keyword is not set, only the current iTool is searched.

## iTool Visualizations Compatible with IPUTDATA

IPUTDATA can set data on the following iTool visualizations:

Item | Arguments | Data to Set
Contour | Z [, X, Y] | If a Z argument is provided, the contour is generated as a function of the two-dimensional array index of each element of Z. If X and Y arguments are provided, the contour is plotted as a function of the (X, Y) locations specified by their contents. See ICONTOUR for details.
Image | IMAGE [, X, Y] | IMAGE is either a vector, or a two- or three-dimensional array representing the sample values to be displayed as an image. X and Y are either vectors or two-dimensional arrays representing the X (or Y) coordinates of the image grid. See IIMAGE for details.
Plot | [X,] Y [, Z] | Y (if one argument is supplied); X, Y (if two arguments are supplied); X, Y, Z (if three arguments are supplied). See IPLOT for details.
Plot3D | X [, Y, Z] | If Y and Z are not supplied, X must be a 3xm array. See IPLOT for details.
Polygon | VERTICES | A 3xm array of vertices. The data must be in device coordinates (see ICONVERTCOORD to convert coordinate systems). See IPOLYGON for details.
Polyline | VERTICES | A 3xm array of vertices. The data must be in device coordinates (see ICONVERTCOORD to convert coordinate systems). See IPOLYLINE for details.
Region of Interest (ROI) | VERTICES | A 3xm array of vertices. The data must be in device coordinates (see ICONVERTCOORD to convert coordinate systems).
Surface | Z [, X, Y] | See IVOLUME for details.
Text | STRING | The text to be displayed. See ITEXT for details.
Vector | U, V [, X, Y] | See IVECTOR for details.
Volume | DATA0 [, DATA1] [, DATA2, DATA3] | Each argument is a three-dimensional array of any numeric type containing volume data. Arrays of strings, structures, object references, and pointers are not allowed. If more than one volume is specified, they must all have the same dimensions. See IVOLUME for details.

## Examples

In the following example, we plot a sine wave with IPLOT, retrieve the data stored in the iTool object, and change the data displayed by the iTool.

; Plot a sine wave

X = 2*!PI/15 * FINDGEN(15)

IPLOT, SIN(X)

; Retrieve the data from the iTool

IGETDATA, 'plot', retX, retY

PRINT, 'Returned iPlot X data:', retX

PRINT, 'Returned iPlot Y data:', retY

; Display a dialog to continue the action

result = DIALOG_MESSAGE('Click OK to change the data.', $

/INFORMATION)

; Change the data in the iTool

IPUTDATA, 'plot', COS(X)

## Version History

7.1 | Introduced

## See Also

IGETDATA, IGETID, ISETPROPERTY, IGETPROPERTY, ICONVERTCOORD