3DSCAT.pdf
Transcript of 3DSCAT.pdf
-
8/12/2019 3DSCAT.pdf
1/10
1041
CHAPTER 45
3D Scatter PlotsIntroduction
General Purpose and DescriptionThe 3D scatter plot displays trivariate points plotted in an X-Y-Z grid. It is particularly useful for
investigating the relationships among these variables. The influence of a discrete variable may be
investigated by using a different plotting symbol for each value of this variable. Hence, up to four
variables (three numeric and one discrete) may be displayed on a single graph.
This procedure has the ability to rotate the data, giving the allusion of motion. This allows the
human brain to better interpret the data.
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
0
20
40
6080
10
20
30
40
50
4050
60
70
80
Data Structure
The data are entered in three numeric variables. A fourth, discrete variable may be used to definethe plotting symbol and color. Below are shown the first few rows of the 150-observation Fisher
Iris dataset. These data are contained in the FISHER database.
-
8/12/2019 3DSCAT.pdf
2/10
1042 3D Scatter Plots
Table 98.1 - Part of Fishers Iris Data
Iris SepalLen SepalWid PetalLen
1 50 33 14
3 64 28 56
2 65 28 46
3 67 31 56
3 63 28 511 46 34 14
3 69 31 51
2 62 22 45
Procedure OptionsThis section describes the options available in this procedure. To find out more about using a
procedure, turn to the Procedures chapter.
Variables Tab
Specify the variables used to make the scatter plot.
Y (Vertical) VariableSpecify the variable displayed along the Y (vertical) axis. Only numeric values are used.
X1 VariableSpecify the variable displayed across the X1 (horizontal - left) axis. Only numeric values are used.
X2 VariableSpecify the variable displayed across the X2 (depth or horizontal - right) axis. Only numeric values
are used.
Symbol VariableSpecify an optional discrete variable whose values are used to defined the plotting color and
symbol. If this variable is omitted, the first symbol and color are used.
Edit Chart InteractivelyChecking this option will cause the interactive graphics editor to be displayed. This allows you to
modify the graph interactively at run time. This editor is documented in its help file. Once you are
through editing the plot, it will be displayed permanently in the output document.
Once the graphics editor comes up, you can use the scroll-bars on the four sides of the graph to
interactively rotate the plot to the viewing position and angle that you like the best.
-
8/12/2019 3DSCAT.pdf
3/10
Chapter 45 3D Scatter Plots 1043
Show SticksThis option controls the display of the vertical lines between the points and the plot floor.
No Yes
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
0
20
40
6080
10
20
30
40
50
4050
60
70
80
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
0
20
40
6080
10
20
30
40
50
4050
60
70
80
Filter Active
This option indicates whether the currently defined filter (if any) should be used when running this
procedure.
Titles TabThese options control the titles that may be placed on all four sides of the chart. Note that the
symbols {Y}, {X1}, and {X2} are replaced by the corresponding variable names.
Top Title
This option gives the text that will appear in the title at the top of the chart. The color, font size, and
style of the text is controlled by the options to the right.
Bottom Title
This option gives the text that will appear in the title at the bottom of the chart. The color, font size,
and style of the text is controlled by the options to the right.
Left Title
This option gives the text that will appear in the title at the left of the chart. This may also serve as a
label. The color and orientation of the text is controlled by the options to the right.
Right Title
This option gives the text that will appear in the title at the right of the chart. This may also serve as
a label. The color and orientation of the text is controlled by the options to the right.
Variable Names
This option lets you select whether to display only variable names, variable labels, or both.
References TabThis panel controls the color and size of the reference labels.
Text Color
This option sets the color of the reference items along the two axes.
Font Size
This option sets the font size of the reference items along the two axes.
-
8/12/2019 3DSCAT.pdf
4/10
1044 3D Scatter Plots
Text Rotation
This option sets the display angle of the reference items along the horizontal axis.
Bold and Italics
This option sets the style of the reference items along the two axes.
Axes TabThese options control the appearance and position of the axes.
Y, X1, X2 Scaling
This option specifies whether the axis is scaled automatically, with a zero axis origin, or from user
specified maximum, minimum, and number of tick marks.
Y, X1, X2 Maximum
Sets the value of the axis maximum. This value must be greater than the largest data value. This
value is only used when Scaling is set to User Defined.
Y, X1, X2 Minimum
Sets the value of the axis minimum. This value must be smaller than the smallest data value alongthis axis. This value is only used when Scaling is set to User Defined.
Y, X1, X2 Ticks
Sets the number of tickmarks. This value is only used when Scaling is set to User Defined.
Grid Line Style
Specify the style (line, dots, dashes, etc.) of the grid lines.
Cage Flip
This option controls whether the back and side walls of the graph cage are allowed to switch to the
opposite edge for better viewing.
Thin WallsThis option specifies whether the walls of the axis grid that forms the background of the chart are
thick or thin.
Grid Color
Set the color of the grid lines.
Cage Wall Color
Set the color of the cage wall in 3D charts.
Cage Edge Color
Set the color of the cage edge in 3D charts.
Show Vertical GridSpecify whether to display the vertical grid lines.
Show Horizontal Grid
Specify whether to display the horizontal grid lines.
-
8/12/2019 3DSCAT.pdf
5/10
Chapter 45 3D Scatter Plots 1045
3D Options TabThese options control the viewing orientation of the plot. These options may be set interactively by
checking the Edit Chart Interactively option and then activating the four scroll bars on the sides of
the Graphics Editor window.
PerspectiveThis option specifies the perceived distance from which the graph is viewed. The range is from 0 to100. As the value gets large, the distance gets smaller. A setting of 50 sets the viewing distance at
about twice the graphs width. A setting of 100 sets the viewing distance at about equal to the
graphs width.
Perspective = 10 Perspective = 90
Scatter Chart
1
2
3S
epalWidth
Iris
SepalLength PetalLength
0
20
40
6080
10
20
30
40
50
4050
60
70
80
Scatter Chart
1
2
3S
epalWidth
Iris
SepalLength PetalLength
0
20
40
6080
10
20
30
40
50
4050
60
70
80
ElevationThis option sets the vertical viewing angle (in degrees). The setting represents an angle above or
below a point halfway up the graph. The range is from -60 to 90.
Elevation = -20 Elevation = 50
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
10
20
30
40
50
020
40 60 80405060
7080
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
0
20
40
60
80
1020
30
40
50
40
50
60
70
80
-
8/12/2019 3DSCAT.pdf
6/10
1046 3D Scatter Plots
RotationThis option sets the horizontal viewing angle (in degrees). The setting represents an angle around
the base of the graph. The range is from -180 to 180.
Rotation = -45 Rotation = 45
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
0
20
40
6080
10
20
30
40
50
40
50
60
7080
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
0
20
40
60
80
10
20
30
40
50
40
50
60
70
80
DepthThis option sets the width in the X2 direction. The range is from 1 to 20,000.
Depth = 20 Depth = 400
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
0 20
4060
80
10
20
30
40
50
40
50
60
70
80
Scatter Chart
1
2
3SepalWidth
Iris
SepalLength PetalLength
0
20
40
6080
10
20
30
40
50
4050
60
70
80
Projection MethodThis option specifies the method used to determine viewer position and angle in a 3D graph.
Isometric Perspective
Scatter Chart
1
2
3SepalW
idth
Iris
SepalLength PetalLength
0
20
40
60
80
10
20
30
40
50
40
50
60
70
80
Scatter Chart
1
2
3SepalW
idth
Iris
SepalLength PetalLength
0
20
40
6080
10
20
30
40
50
40
50
60
70
80
-
8/12/2019 3DSCAT.pdf
7/10
Chapter 45 3D Scatter Plots 1047
Legend TabThese options specify the legend. Note that the legend is only displayed when a Symbol Variable is
selected.
Position
This option sets the position of the legend around the chart. Note that if you choose a position inwhich the full text of the legend cannot be fit, the legend will not be displayed.
Percent Vertical
Specify the size of the legend as a percentage of the maximum possible. This option lets you shrink
a legend that is too large.
Text Color
Specify the color of the legend text.
Background
Specify the background color of the legend.
Font SizeSpecify the size of the legend text.
Bold and Italics
Specify the style of the legend text.
Back Style
Specify the background style of the legend.
Color as Labels
Normally, text in the legend is displayed using the color selected by the Text Color option. This
option indicates that each legend entry is to be displayed in the corresponding group color.
Background TabThese options specify the colors and background styles of various sections of the plot.
Entire Graph
Specify the background color and style of the entire plot.
Inside Graph
Specify the background color and style of the plot itself (within the axes).
Graph Title
Specify the background color and style of the plot title.
Left Title
Specify the background color and style of the left title.
Right Title
Specify the background color and style of the right title.
Bottom Title
Specify the background color and style of the bottom title.
-
8/12/2019 3DSCAT.pdf
8/10
1048 3D Scatter Plots
Symbols 1 and 2 TabsThese options specify the colors and patterns used for the plotting symbols. A different plotting
symbol is displayed for each unique value of the Symbol Variable. If no Symbol Variable is
specified, the settings of Symbol 1 are used for the plot symbol.
Symbol 1 - 15These options let you specify the color and type of each symbol. The first symbol is associated withthe first value, the second symbol with the second value, and so on. If more than fifteen symbols
are needed, they are reused so that symbol 16 = symbol 1, symbol 17 = symbol 2, and so on.
Template TabThe options on this panel allow various sets of options to be loaded (File menu: Load Template) or
stored (File menu: Save Template). A template file contains all the settings for this procedure.
File Name
Designate the name of the template file either to be loaded or stored.
Template Files
A list of previously stored template files for this procedure.
Template Ids
A list of the Template Ids of the corresponding files. This id value is loaded in the box at the
bottom of the panel.
TutorialThis section presents an example of how to create a 3D scatter plot of the data stored on the
FISHER database.
1 Open the Fisher dataset.
From the File menu of the NCSS Data window, select Open.
Select the Datasubdirectory of the NCSS97directory.
Click on the file Fisher.s0.
Click Open.
2 Open the 3D Scatter Plot window.
On the menus, select Graphics, then Charts, then 3D Scatter Plot. The 3D Scatter Plot
procedure will be displayed.
On the menus, select File, then New Template. This will fill the procedure with the default
template.
3 Specify the variables.
On the 3D Scatter Plot window, select the Variables tab.
Double-click in the Y (Vertical) Variable text box. This will bring up the variable selection
window.
Select SepalWidthfrom the list of variables and then click Ok. SepalWidth will appear
in the Y Variable box.
Double-click in the X1 Variable text box. This will bring up the variable selection window.
Select SepalLengthfrom the list of variables and then click Ok. SepalLength will appear
in the X1 Variable box.
-
8/12/2019 3DSCAT.pdf
9/10
Chapter 45 3D Scatter Plots 1049
Double-click in the X2 Variable text box. This will bring up the variable selection window.
Select PetalLengthfrom the list of variables and then click Ok. PetalLength will appear
in the X2 Variable box.
Double-click in the Symbol Variable text box. This will bring up the variable selection
window.
Select Irisfrom the list of variables and then click Ok. Iris will appear in the SymbolVariable box.
4 Run the procedure.
From the Run menu, select Run Procedure. Alternatively, just click the Run button (the
left-most button on the button bar at the top).
Figure 45.1 3D Scatter Plot
Scatter Plot
1
2
3
SepalWidth
Iris
SepalLength PetalLength
0
20
40
60
80
10
20
30
40
50
40
50
60
70
80
Tutorial - Interactive RotationThis section presents an example of real-time rotation of a 3D scatter plot of the data stored on the
FISHER database.
1 Open the Fisher dataset.
From the File menu of the NCSS Data window, select Open.
Select the Datasubdirectory of the NCSS97directory.
Click on the file Fisher.s0.
Click Open.
2 Open the 3D Scatter Plot window.
On the menus, select Graphics, then Charts, then 3D Scatter Plot. The 3D Scatter Plot
procedure will be displayed.
On the menus, select File, then New Template. This will fill the procedure with the default
-
8/12/2019 3DSCAT.pdf
10/10
1050 3D Scatter Plots
template.
3 Specify the variables.
On the 3D Scatter Plot window, select the Variables tab.
Double-click in the Y (Vertical) Variable text box. This will bring up the variable selection
window.
Select SepalWidthfrom the list of variables and then click Ok. SepalWidth will appearin the Y Variable box.
Double-click in the X1 Variable text box. This will bring up the variable selection window.
Select SepalLengthfrom the list of variables and then click Ok. SepalLength will appear
in the X1 Variable box.
Double-click in the X2 Variable text box. This will bring up the variable selection window.
Select PetalLengthfrom the list of variables and then click Ok. PetalLength will appear
in the X2 Variable box.
Double-click in the Symbol Variable text box. This will bring up the variable selection
window.
Select Irisfrom the list of variables and then click Ok. Iris will appear in the SymbolVariable box.
Check the Edit Chart Interactivelybox.
4 Specify the axes.
On the 3D Scatter Plot window, select the Axes tab.
Check the Thin Wallsoption.
Click the Show Vertical Gridoption so that it is not checked.
Click the Show Horizontal Gridoption so that it is not checked.
Set the Cage Wall Colorto white by clicking the button and checking the white color
button on the Color of Cage Wall Color window.
5 Run the procedure. From the Run menu, select Run Procedure. Alternatively, just click the Run button (the
left-most button on the button bar at the top). This will cause the 3D Scatter Plot Editing
window to appear.
The scroll bar on the left controls the vertical view angle. Try moving the thumb of this
scroll bar up and down. The scatter plot will have the appearance of motion.
The scroll bar on the bottom controls the horizontal view angle. Try moving the thumb of
this scroll bar right and left. The scatter plot will have the appearance of motion.
The other two scroll bars control the depth and perspective of the plot.
The tool bar at the top allows the setting of almost every detail of the plot.