Customizing xdatplot (X resources)

The default behavior of xdatplot can be extensively modified by the X resource mechanism.

Where xdatplot finds X resources

To customize xdatplot, you change resource values from their defaults. There are three main ways to change resources:

Application resources

Ones you may find useful

fileConvert:
Tells how to convert foreign formats. See file formats.

printLimit: 65535
If you try to print (or export as postscript, or as MIF) a plot with more than this number of points, xdatplot will ask for confirmation. This is to prevent you from accidentally locking up xdatplot and filling your disk with enormous printouts. If you like living dangerously, you can set it to 0: then plots of any size will be printed without asking.

printCommand: "print_big"
The command used to print plots. print_big is a little shell script that allows big files to be printed. You get it wherever you got xdatplot.

helpViewer: "mosaic"
The program that should be run to view the help files. You can change this if mosaic has a different name on your system (for instance Mosaic or xmosaic).

helpURL: "http://eatworms.swmed.edu/Software/xdatplot_help"
The URL that mosaic should contact to get the help. The actual URLs are constructed by appending "/filename" to this. The default is to contact my WWW server, which has the advantage that you don't need to install the help files on your machine. However, fetching the help over the internet may be slower than you like, and of course won't work at all on machines without an internet connection. In this case, you can fetch the helpfiles (xdatplot_help.tar.gz), install them somewhere on your machine, and set this resource to point to them.

tUnits: sec
tMultiplier: "NaN"
tGain: 1.0
vUnits: V
vMultiplier: "NaN"
vGain: 1.0
These are the settings in the Units dialog. "NaN" (not a number) for the multiplier means that the multiplier should be read from the data file.

tWidth: 5.0
vHeight: "NaN"
These determine the size of the region initially plotted when a new data file is read in. "NaN", not a number, means plot the full extent.

tTics: 3
tTicLength: 5
vTics: 3
vTicLength: 5
topMargin: 30
bottomMargin: 30
rightMargin: 10
leftMargin: 60
plotFont: "fixed"
plotHeadingFont: "9x15bold"
markSize: 20
markThickness: 3
CURSORColor: "red"
These resources affect the appearance of the plot: its placement within the main window, the fonts used for labeling, the number and size of tic marks on the axes. Dimensions are in pixels.

peakHeight: 1.0
troughDepth: 1.0
peakHalfWidth: 0.015
troughHalfWidth: 0.015
These are the initial values of the thresholds in the peaks dialog.

autoscaleAlways: True
Controls the initial setting of the autofit toggle in the control panel.

autoscaleSize: 0.8
Determines how the plot will be fit into the plot window on Fit height or autoscale. The axes are adjusted so that between the max and min is the indicated proportion of the full V axis.

markColor: blue
markColor2: medium sea green
markColor3: saddle brown
markColor4: yellow
color2Marks: pt
color3Marks: 0123456789
color4Marks:
The resources control the colors in which marks are displayed in the plot window. (All printouts and Exports, alas, are black and white.) For instance, with the default settings above, p and t marks will be painted in color 2 (medium sea green), digit marks will be painted in color 3 (saddle brown), and any other marks will be blue.

Ones you might want to understand

saveList: *dataFile *tUnits *tMultiplier *tGain *vUnits *vMultiplier *vGain *control*commentText.value *peakHeight *troughDepth *peakHalfWidth *troughHalfWidth *filterChain *markList
This lists the resources to be saved in xdp files.

filterChain:
This lists all the currently active filters, with their parameters.

markCommentFormat2: "t = %g, V = %g"
markCommentFormat3: "t = %g, V = %g, area = %g, height = %g"
These formats are used to set the comments on marks. Format2 (i.e., the one for two numbers) is the most used: the first %g is replaced with the time of the mark, and the second with its voltage. Format3 is used during peak searches. The third %g is replaced with the area of the peak, and the fourth with its height. (Yeah, I know, it really ought to be called Format4. It's historical.)

markList:
This is the list of all current marks. Most useful in xdp files. Can get very big.

noControlPanel:
This resource, also available as the command-line option -no_control_panel, suppresses the control panel at the bottom of the main window if True. It is used mainly in starting child xdatplot windows.

Technical things you probably don't really want to know about

These are used internally, and probably should not be set in resource files. Some of them (most importantly dataFile) are used in xdp files.

Widget resources

Widget resources are fundamental to the operation of xdatplot, as of most Xwindows programs. There are literally thousands of them, and they can be used to completely modify the look and behavior of an application. Only a few of the most useful are described here. Those hardier Xperts who want to dig deep in the xdatplot Widget hierarchy can look at the file XDatplot.ad in the source distribution, which contains the fallback resources.
XDatplot.geometry: +1-1
peaksShell.geometry: +1+1
filterShell.geometry: -50+1
unitsShell.geometry:
These resources determine where the main window and the dialog boxes will appear on your screen.

plot.background: white
plot.foreground: black
plot.width: 800
plot.height: 400
These set the initial size and colors of the plot window.

hptFilter.htTauField.value: 0.01
hpfFilter.hpFrequencyField.value: 10
lptFilter.lpTauField.value: 0.0002
lpfFilter.lpFrequencyField.value: 1000
mmFilter.mmNField.value: 20
scFilter.scFactorField.value: -1
pkFilter.pkStartField.value: 0
pkFilter.pkNField.value: 2
tpFilter.tpFileField.value: none
tpFilter.tpMaxField.value: infinity
tpFilter.tpMinField.value: 0.0
cvFilter.cvFileField.value: none
cvFilter.cvTscaleField.value: 0.002
These resources set the default values of the parameters for the different types of filters.

marksFilter*textString: edinout
This is the initial guess for a marks filter.

Leon Avery (leon@eatworms.swmed.edu)