VisIt supports some analysis and visualization methods that are alternate representations for data. This tutorial walks through three of them:
- Scatter Plots
- Parallel Coordinates
- Data Binning
- 1 Scatterplots
- 2 Parallel coordinates
- 3 Data Binning
What are Scatter Plots?
Scatter Plots are plots of data that show the correlation between variables by mapping them directly to the axes of a 2D or 3D plot. For example, it might be useful to generate a scatterplot of temperature versus pressure. The image to the right is a simple Scatter Plot of two variables from the example.silo dataset.
Scatter Plots in VisIt can extend into 3D to show the corellation between three independent variables. And finally, VisIt can use color to encode yet a fourth variable in the image. Color can also be added to a 2D Scatter Plot to add a third dimension.
Experiment with Scatter Plots
Your first Scatter Plot
- Open the example.silo dataset.
- From the Plots menu, select "Scatter" and then "temp".
A Scatter Plot "wizard" appears, allowing easy creation of the plot. Follow the prompts.
- Note that the X Variable menu at the right of the wizard already has your selected "temp" variable.
- From the Y Variable menu on the right of the wizard that says "<Select>", choose Scalars->pressure.
- Press the "Done" button.
You now have a Scatter Plot in the Active plots list ready to be drawn.
- Hit Draw
You should get the simple picture at the top right of the page.
Play with the Plot options
There are a lot of options available for the Scatter Plot. Let's try some of them.
- Double-click the plot in the Active plots list to bring up the attributes window.
There are two primary tabs to manipulate the plot, Inputs and Appearance. Let's try changing the inputs to create a more complex Scatter Plot. First note that a summary of all of your input settings are summarized near the bottom of the window for quick reference.
- Click "Input 3".
- Change the Variable from "default" to "grad_magnitude"
- Change the Role from "None" to "Z coordinate".
- Click Apply and watch the plot change. Rotate it around to get a sense of the multivariate correllation.
Okay plot, but a bit hard to see. Let's add some color.
# Click "Input 4".
- Change the Variable from from "default" to "chromeVf".
- Change the Role from "None" to "Color".
- Click Apply and watch the plot.
Interesting plot. Let's try changing the appearance.
- Click the "Appearance" tab at the top.
- Change the "Point Type" to "Sphere".
- Change the "Point size (pixels)" to 10.
- Change the "Color table" to "difference"
- Click Apply.
Now the 3D relationship between the points should be more clear.
Parallel coordinates plots have traditionally been used in the field of Information Visualization (or "Info Vis") to display data with a high number of dimensions. We have incorporated parallel coordinates plots into VisIt in a way that allows for the summary of very large data yet still allowing the exploration of individual data points. See Parallel Coordinates Introduction for a pictoral introduction to parallel coordinates in VisIt.
Experiment with Parallel Coordinates
- Open example.silo
- Create a Parallel Coordinates plot and select "temp".
- In the wizard that appears, add "pressure" as the next variable.
- If you feel like it, continue to add variables. The set of valid node-centered variables in the example.silo dataset are: temp, pressure, airVf, airVfGradient_magnitude, chromeVf, grad_magnitude, radial, and x.
- When you're done, hit Done. Your plot will be in the Active plots list and ready to draw.
- Hit Draw.
You should have a decent looking parallel coordinates plot drawn.
With the plot from the prior exercise, let's try restricting the data to focus on features of interest.
Red arrows will appear at the bottom and top of each of your axes . If you drag any of these into your data, the appearance will change. The context (density) is still shown in the background, but individual data lines are drawn over the top.
- Continue playing with the axis restriction tool to better understand the trends that you're seeing.
Using Parallel Coordinates to do data subsetting
The Axis Restriction tool can be linked to data subsets in other windows. Let's use your existing Parallel Coordinates plot to restrict a Pseudocolor Plot in a second window.
- Open second window
- Create Pseudocolor Plot of temp.
- Apply a Threshold Operator
- To the Threshold Operator, add the variables that you have in the Parallel Coordinates plot in the first window. (You only need to add the variables that you are going to restrict.)
You might want to lay the windows out so that they don't overlap each other so that changes in one window can be seen quickly in the other window.
- In both windows, enable the Lock Tools button . You can also enable it through the Windows->Lock->Tools option, as shown to the right.
Data Binning is an extension to histogramming. In its simplest form (1D with the reduction operator "count"), the output of a Data Binning operation is precisely a histogram. But they also work in 2D and 3D and they provide a richer set of reduction operators than just simple counts. The reduction operators can be applied to a separate variable. For example, you can consider the average density as a function of pressure. The available operators are: Average, Minimum, Maximum, StandardDeviation, Variance, Sum, Count, and PDF.
1D curve example
- Open example.silo.
- Make a Curve plot of operators/DataBinning/1D/Mesh.
- Note that VisIt automatically added the DataBinning operator for you.
- Bring up the DataBinning attributes.
- Change the variable to temp
- Change the reduction operator to count
- Hit apply
- This is a histogram of temp.
- Go to Controls->Expressions and make the expression X=coord(Mesh)
- Change the attributes to have dimension 1 be of variable "X". Change the reduction operator to "Sum" and change the variable it sums to be "chromeVf".
- This is exactly the curve we created in our scripting example in the beginning course in the scripting section.
Another 1D example
- Make 3 curve plots, each of operators/DataBinning/1D/Mesh.
- All three data binning operators will be over temp and the variable for the reduction operator will be pressure. But make the reduction operator be minimum, average, and maximum.
- The resulting curves show the variance of one variable as a function of another.
- Delete your curve plot. Make a Pseudocolor plot of operators/DataBinning/2D/Mesh.
- Change the dimension to 2D (this should be automatic)
- Change variable 1 to temp
- Change variable 2 to pressure
- Change the reduction operator to PDF.
- Apply and draw.
- You have made a probability density function (PDF) of temp vs pressure.
- Make a Contour plot of operators/DataBinning/3D/Mesh
- The three variables are temp, pressure, and radial.
- Reduction operator is PDF.
- This operator works with all of our plots and operators.
- Modulo volume plot. Still a crash in 2.1.1, even though I thought I fixed it.
One more 3D example
- Make three expressions:
- Replace X from before with coord(PointMesh) (Mesh->PointMesh)
- Similar for Y and Z
- Make a pseudocolor plot of operators/DataBinning/3D/Mesh.
- Make the three variables be X, Y, Z
- Make the reduction operator be Count.
- Change the number of bins to be 5x5x5.
- We are now plotting density of the point mesh.