vtkSCATTER Procedure
Renders 3D points.
Usage
vtkSCATTER, points
Input Parameters
points—(3, n) float array describing x, y, and z points in data coordinates.
Keywords
Name—Specifies a name to be used to create this object. If an undefined variable is used or no name specified, then a random name is used. This name can be used in calls to vtkCOMMAND to modify this object.
Symbol—A scalar integer describing the type of marker or glyph to be displayed for each point. Supported values are 0-4 where:
0 = Sphere
1 = Cube
2 = Cone
3 = Cylinder
4 = Earth
Color—An array expression of the same dimensions as the number of points (the value n above), containing the color index at each point. Alternately an expression describing one color to be used for all points. If this keyword is omitted, white points are displayed.
To specify a single color, see
vtkWINDOW Procedure. If a vector of colors is specified, the color variable can be in these formats:
FIX(
n)—A one-dimensional array of short integers or bytes specifying an index into the current PV‑WAVE color table for each point. The RGB color for each point is obtained from the corresponding entry in the current PV‑WAVE color table.
LONG(
n)—A one-dimensional array of long integers specifying the 24-bit color at each point.
FLOAT(3,
n)—A floating point array of size (3,
n) containing the normalized values specifying the red, green, and blue components of the color at each point.
Scale—A float value specifying the scaling factor for the size of each glyph. (Default: 1.0)
LOD—If nonzero, the glyphs are created as level-of-detail actors to aid in keeping a high frame-rate during frequent render requests due to user mouse interaction. If set to a value greater than 1, the number of points to use in the random cloud.
NoRotate—Does not perform any camera rotations. Used when a previous call to vtkSURFACE, vtkSCATTER or vtkPOLYSHADE has already set the camera angle.
NoErase—If nonzero, prevents the window from being erased to the background color before drawing the new scene. If not set, then all lights, cameras, and objects are removed from the scene before objects for the new scene are added.
NoAxes—If present and non zero, then no x, y, and z axes will be drawn.
TextColor—The color for text used for the axes titles. See
vtkWINDOW Procedure for possible ways to specify the color. (Default:
'white
') These keywords are passed to vtkAXES:
Other keywords are listed below. For a description of each keyword, see
Chapter 21: Graphics and Plotting Keywords.
Discussion
This procedure plots points in space using three-dimensional markers (glyphs) with optional axes.
Example
; Create the data array.
data=FLTARR(3,200)
; Read in the data
s=DC_READ_FREE(!Data_Dir+'scattered.dat',data,/Column,/Resize)
; A quick look at the data.
vtkSCATTER,data
; Set up a color table.
TEK_COLOR
; Create an array of color values for the points.
s=SIZE(data) & c=INDGEN(s(2))
; A better look at the data.
vtkSCATTER,data,Color=c,Xtitle='X Values',Ytitle='Y Values', $
Ztitle='Z Values',TextColor=16,ax=10,az=100,Scale=.6
See Also