Plotting Parallel Data (PGraph)
Overview
This document exists to outline the mechanism for plotting data that comes from distributed parallel sources within ParaQ. We dub the collection of code for parallel plotting as PGraph, although the implementation will actually be set of smaller, distinct pieces. Because two of the main design criteria for ParaQ are the ability to scale well on parallel machines and provide quantitative information, the design of PGraph is critical.
Use Cases
The overall goal of PGraph is to provide plot-style visualizations of distributed VTK objects. In this section we list the types of plots users may wish to perform on their data. I encourage other ParaQ developers to contribute to this list as they see fit.
Immediately below is a table listing the types of abstract visualizations with plots users may wish to create. The "Plot Type" column refers to one of the types of plots, which are listed further below in the Plot Types table.
Abstract Visualizations with Plots
Name | Description | Plot Type |
---|---|---|
Histogram | Given a data array (usually point scalars or cell scalars), returns a discrete function with <math>N</math> items or bins. Each bin has an assigned range and contains the count of entries in the data array that fall within that range. | Bar Chart or X-Y Plot |
Time Plot | Given a point or cell, show the values of some scalar over time. | X-Y Plot |
Line Probe | Given a line in space, plot the value of a scalar field defined by a data set along the line. | X-Y Plot |
Plane Probe | Given a plane in space, plot the value of a scalar field defined by a data set along the line. | X-Y-Z Plot |
Scatter Plot | Like a histogram, except that two scalars are selected and the bins are set into a 2D grid with each bin representing a range in each scalar. | Density Plot |
Plot Types
Name | Input Dimensions | Description |
---|---|---|
Bar Chart | 1 | Shows discrete values with bars with heights proportional to the values. |
X-Y Plot | 1 | A traditional graph of a function with the variables on the X axis and the value on the Y axis. |
X-Y-Z Plot | 2 | This plot shows a surface in 3-space. The X and Y axis represent two input variables. The position of the surface in Z corresponds to the value for the variables at the given X and Y position. |
Density Plot | 2 | A 2D plot with both the X and Y axis representing input variables. Every point in the image shaded (or colored) to represent the value at that point. |
Approach
Our approach is based on the fact that the input for all of the plots given in Plot Types can be represented as either 1D or 2D arrays. Furthermore, because the resolution of the displays is limited to what representable by the display media, the size of these arrays Thus, to simplify things and enable us to break this problem into manageable pieces, we represent the plot data in simple arrays.
The image below shows the basic units of PGraph. The Sampling unit takes VTK objects, which may be distributed, and performs some sort of sampling to generate arrays of data. The Parallel Reduction unit combines array distributed across processes to a single array. The Server to Client unit transfers data from the root of the data server to the client. Finally, Qt Plotting Components are components that represent the arrays a plots. They are Qt components.
Obviously, some of these units may not be necessary. For example, Server to Client is only necessary in client/server mode. Parallel Reduction is only necessary in a parallel job.