Creates a graphical scatter chart of any number of variable pairs (xVector yVector). The first vector of the pair contains all the "X" values and the second vector contains a set of "Y" values that correspond to the "X" values. Both vectors of a pair must be the same length.
The chart will by default have linear-scaled axes. If the log keyword is present, the graph's Y-axis will have a logarithmic scale. If the loglog keyword is present, both axes will have logarithmic scales. An exception is that if the X or Y data contains any values that are illegal for logs (I.e, they are negative or zero) then the keyword will be ignored and the scales will be linear.
The chart is displayed in the Statistics101 Output Window in a tab of its own. There are three titles or labels associated with the graph: the tab title, the X-axis label, and the Y-axis label. The optional keyword title establishes the title to be displayed in the graph's tab. It takes a literal string (enclosed in double quotes) or a string variable argument that becomes the tab's title. If the title keyword and its argument are omitted, then the tab's title will display the Y-axis label. If there is no Y-axis label, then the tab's title will be the name of the first input yVector.
The axis labels, which may be literal strings (enclosed in double quotes) or string variables, are not associated with any keyword. If they are omitted, then the name of the first yVector becomes the Y-axis label and the name of the xVector becomes the X-axis label. If the axis labels are present, they are assigned based on their order, the first being the Y-axis label and the second being the X-axis label. If you want to specify an X-axis label but you want to keep the default Y-axis label (the name of the first yVector), you can use an empty string ("") as the Y-axis label, followed by the X-axis label. This maintains the required order.
If you don't want a label for either or both axes, use a blank string (" ") for that axis or for both axes. Note the difference between a blank string and an empty string: the blank string has at least one blank in it and only blanks. The empty string has nothing between the two quote marks.
Note that in graphs created by SCATTERGRAPH, the Interpolate and the Use Dashed Lines menu items are disabled because they do not apply.
The following program illustrates the operations of the SCATTERGRAPH command. Cut and paste it into Statistics101's edit window and run it.
'Make a scatter chart of a 2-dimensional normal random variable: NORMAL 1000 0 1 NormalX NORMAL 1000 0 1 NormalY SCATTERGRAPH "Normal Scatter" normalX normalY
Here is the output of the above program: