Making a Multi-D Scatter Plot

Revision as of 21:02, 6 February 2007 by Lchrisman (talk | contribs) (Setting up the data for the example)

In this tutorial example, we'll plot the points from a 4-D Gaussian distribution as a scatter plot. You will learn how to set up a scatter plot when the coordinates of the data are organized as columns in a single table, and how such plots can be interactively pivoted to view the scatter points from each dimension.

First, let's create the data to be plotted. For this, we'll define a 4-D gaussian distribution. Follow these steps:

1. Start with a fresh model.

2. In the model's object window, fill in the title and description. ScatterExample1.jpg

3. Close the object window.

4. Select File->Add Library... -> Multivariate Distributions.ana

5. Create these two indexes:

Index Dim := [1,2,3,4]
Index Dim2 := CopyIndex(Dim)

ScatterExample2.jpg

7. Define the covariance matrix. Create a variable named covar and set the definition type to Table. Select the Dim and Dim2 indexes and fill in the edit table with a covariance matrix:

ScatterExample3.jpg

8. Define the Gaussian distribution. Create a chance variable node named X and set the definition to:

Gaussian( 0, covar, Dim, Dim2 )

ScatterExample4.jpg

9. Select Result-> Uncertainty Options... and set the sample size to 1000. (so we have more points on our plot)

ScatterExample5.jpg

10. Select X and show Result->Sample. Switch to graph mode if not already.

ScatterExample6.jpg

11. Switch to table view to examine the actual data. For convenience, pivot so that Index Dim forms the columns, Run the rows.

ScatterExample7.jpg

= Setting the Coordinate Index

At this point you have defined some data to graph, and are viewing the default graph.

Comments


You are not allowed to post comments.