next up previous contents
Next: 5.4 PaPCo color scheme Up: 5. Behind the scenes Previous: 5.2 Panel editor philosophy

Subsections

   
5.3 Plotting philosophy

PaPCo uses a PANEL VECTOR to control the positioning of a specific plot panel. To do this, each user-written plotting routine must include the call

setpanel(panel)

where panel is the PANEL VECTOR as described in Section 4.3.2. This call simply sets the viewport for the user's plot using the IDL system variable !P.POSITION.
panel is one of the variables that is passed to the user's plot routine by the PaPCo.

The information contained in this vector can be used to further customize the user's plot. For example, the user can subdivide this viewport further to plot individual images, or decrease the plot height to add auxiliary x-axes.

The plot_type module template included in PaPCo and all the modules currently included in PaPCo adhere to these simple rules:

1.
If a plot is the first panel (panel(0)=0), then labels for the x-axis have to be plotted. At minimum this would be a time-axis, but auxiliary information such as ephemeris information might be useful to add here.
2.
Logically, if the plot is not the first one at the bottom, the plotting of an x-axis should be inhibited. However, it is up to the user to further reduce the plotting window size if he needs to plot some other axis, such as secondary ephemeris information when comparing data from two spacecraft. An example is the Los Alamos module, where the local time for each satellite is plotted together with the data even when the Los Alamos panel is not the bottom one. This is all user-defined. The x-axis titles should not be below the axis, as there might be several levels of labeling, but rather to the right of the axis.
3.
The y-axis labels are generally on the left hand side and represent the physical units of the plot. The width of this label and the number of tick marks should be adjusted depending on the height of the panel compared to the total height in the plot window.
4.
A short description of the plot should be placed on the right hand side of the plot, identifying the data source and product.
5.
For the special case that the plot is the only panel, there should be an option for adding a header for the plot. Existing plot modules for PAPCO use the panel vector to decide if they're the top panel and then always plot a header containing at least the date for the data. Newer modules don't do this, since the text utility module (see Section 7.2) can be used to add a top panel with Title text in a more controlled way.
6.
By default, all plots have the capability of auto-scaling the range of the data they plot. These user-defined routines are of varying sophistication and up to the user to supply, or he can simply hard-wire fixed limits for his plot. PaPCo supplies a few scaling routines such as papco_autorange.pro for color spectrograms and ylim.pro for simple line plots. However, any simple scaling routine will fail to yield good plotting limits at times, and for this purpose PaPCo offers the possibility to override the automatic y-limits provided by the user. For this purpose each plotting routine needs to include a common block common yscale, yscl where yscl is an array of four-element vectors. There are as many array entries as there are panels, and each element has the following meaning (where * refers to the panel number):
yscl(*,0)
is set to 0 or 1 indicating automatic or manual y-scaling
yscl(*,1)
contains the manually set lower y-limit, or the automatically set lower y-limit depending on yscl(*,0)
yscl(*,2)
contains the manually set upper y-limit, or the automatically set upper y-limit depending on yscl(*,0)
yscl(*3)
is set to 0 for linear and 1 for log axis scaling.
This common block is also used by the overplot facility to know which y-scale needs to be adopted by the overplot.
In an analogous manner there is a zscale common block for scaling the third dimension of a plot.

5.3.1 Time arrays

With the old T90 format, all time was a continuous running number of seconds since Jan 1. 1990. Apart from being limiting (nothing before 1990 could be added), the plotting routines also ran into serious problem plotting in T90: the IDL plot routine internally scales everything to a float, so as T90 numbers got big rounding problems appeared. Also, converting to T90 could be time-intensive.

Consequently, a considerable amount of effort has been invested in adopting a new time standard for PaPCo: MJDT (modified Julian date plus seconds since midnight of that day). The PaPCo zooming function is now independent of whatever time axis a module actually uses. The following convention has been adopted for all new modules (the old ones using T90 are still compatible, too):

All data passed to the plotting routine has it's time array reduced to the number of seconds since the start of the start day of the plot. The existing PaPCo module template adhere to this standard, and there is some auxiliary support for its use (like functions for making time labels of various types).


next up previous contents
Next: 5.4 PaPCo color scheme Up: 5. Behind the scenes Previous: 5.2 Panel editor philosophy
Reiner Friedel
1999-02-03