The following examples show how to plot variables and illustrate various plot output options. More examples can be seen under sections which demonstrate how to setup various function calls.
Figure 13 shows a set of time based plots. The data plotted comes from the Cluster C1 magnetometer experiment. Any time based scalar variable can be used as input to a time based plot. If the variable has been stored in a time based grid such as the system-wide time grid then only the parameter being plotted against the Y axis needs to be specified. The time information is obtained from the grid.
The data being plotted and the characteristics of the plots are defined in the PLOT DEFINITIONS menu. The menu contains three definitions, one being output in each of the three plots set up in the plot layout menu. Each plot uses a different output format format and is output in a different color. For all plots the Grid option has been left set to NO and the autoscale option has been set to YES. Hilight a plot definition and then click EDIT to see the full set of option definitions for and of the plot in the work area. The plot color for both the top and bottom plot is set in the Line Color option while the middle plot color, which is a POINT plot is set in the Symbol Color option.
Figure 14 shows the same plots as in Figure 13 with the exception that the Grid option in each plot definition is set to NO. When the Grid option in a plot definition is set to NO the data being plotted is displayed in the plot at its native time resolution or the time resolution of the time grid its stored in. In many cases there are more data points in the plot than there are pixels across the plot. This can produce noisy looking plots at times since there will be an lot of overplotting. Setting the Grid option in a plot definition to YES causes the input data to be regridded at the pixel resolution across the plot.
Figure 15 shows a set of XY plots. XY plots are non-time based plots (the Time option in the plot layout definition for the plot is set to NO). They require both an X and Y input variable in their plot definition. This example uses the same data set as in the examples of the time-based plots but plots the data components one against the other.
All three plots use the POINT plot format. Both axes are autoscaled in all plots and different colors are used for each plot. A dummy plot was defined to fill the empty lower right cell in the plot grid to keep the displayed plot axes aligned.
Figure 16 shows a set of 3 spectroscalar plots. Spectroscalar plots are plots of scalar quantities in a spectrogram format. Outputting a set of spectroscalar plots under UDFAnalysis takes a bit more effort and thought than outputting other types of plots and for that reason we will describe how the plots were set up in some detail.
A spectroscalar plot is a 3D data representation with each plot definition requiring an X, Y and I variable designation. Here X is time, the Y variable gives the Y range over which the spectroscalar extends in the plot panel and the I variable is the intensity which is translated to color. The Y variable is not part of the data read in and so needs to be created. This is done using the SetV Function.
Before setting up the Y variable consider how to arrange the plot. The easiest way to get the three spectroscalar plots into a single plot panel is to scale the Y axis of the plot to run from 0 to 3 and then to set the Y range for the three spectroscalar plots to run from 0 to 1, 1 to 2, and 2 to 3 respectively. Setting up a Y range means setting up a pair of Y variables for each plot to hold the starting and stopping positions.
If you look at the SetV function definition in the menu you will see three pairs of order 2 variables defined. Each pair represents the start and stop Y value for one of the three spectroscalar plots. These become the Y variables in the plot definitions.
In the plot layout menu there is a single defined layout with its Y axis scaled from 0 to 3. There are only three major tick marks along the Y axis which will divide the three spectroscalar plots. The tick format has been set to SPAN so that each tick runs across the X direction. A colorbar is output below the lower X axis, all numerical annotation along the Y axis has been turned off and the left and bottom gaps have been increased. The increase in the left gap is for annotation and the increase in the bottom gap is to add extra room for the colorbar.
Since the input data has been stored in the system-wide time grid there is no X variable for any if the entries in the PLOT DEFINITIONS menu. The Y variables are those defined in the SetV function. These are of order 2 and represent the start and stop values associated with the measurements. The intensities are the scalar components of the vector magnetic field. Autoscaling of the Y axis is turned off for all plot definitions.
One variation on the above would be to define the Y extent of each of the three magnetic field components to show a gap in the plot, adding separation. In this scenario the ranges for the three variables might be set to run from 0 to .97, 1.03 to 1.97, and 2.03 to 3 respectively.
Figure 17 shows a spectrogram of electron data from the Cluster C2 PEACE electron experiment. The basic difference between a spectrogram and a spectroscalar plot is that the data is truly 2D and has an inherent Y scaling associated with it. This is obtained when the data is accessed. You can see this in the set up menu associated with the variable definition.
One thing you will become aware of if you run this example is that it takes an quite a while for the plot to come up. This is a function of how Tk renders its plots and not slowness in acquiring the data.