Table of Contents

Name

merplot - draws line graphs of data output from ERP program merp

Synopsis

merplot plot_device cmdfile [-pause] [-baseline start stop] [-nobaseline] [-filter filtertype cutoff [cutoff]]

Description

merplot is a program which plots (linegraph) data on a graphics device (plot_device) according to specifications in cmdfile (see COMMAND FILE section). merplot calculates the mean amplitude across a time window specified by the user. The program allows arbitrary colors, linestyles, and any of eight different symbols (markertype) to differentiate among traces. merplot allows labeling of both the x and y axis, as well as legends at the top and bottom of the page.

Options

-pause
If the -pause option is specified, the merplot program will pause between plotting pages when there are multiple pages and the plotting device clears its drawing surface for new pages (a hardcopy device like a printer does not clear its drawing surface, it ejects a page and starts with a new drawing surface).
-baseline start stop
This option is identical to the baseline command described in the COMMAND FILE section below. It overrides any baseline (or nobaseline) specified in the command file.
-nobaseline
This option is identical to the nobaseline command described in the COMMAND FILE section below. It overrides any baseline specified in the command file.
-filter filtertype cutoff [cutoff]
This option is identical to the filter command described in the COMMAND FILE section below. It overrides any filter specified in the command file.

Command File

The following is a description of the command file syntax. Optional command parameters are enclosed in brackets and described at the end.

Three commands must appear in the cmdfile: (1) file, (2) bin, and (3) the pagelayout - endpagelayout pair commands. The pagelayout command specifies the order in which electrodes will be displayed along the horizontal axis. merplot will create several groups of connected line segments; you specify the electrodes you want to be connected by connecting their labels with hyphens. The electrode groups are then separated by white space (spaces, tabs, newlines) After the electrode groups have been specified the endpagelayout command should follow on a line by itself. The syntax for the file, bin, and the pagelayout - endpagelayout pair commands are as follows:

file filename
Specify the file name of the ERP data file. The file command must be appear at some point in cmdfile before the bin command. More than one file command may be present in cmdfile, to allow bins to be specified from different files.

bin bin# markertype [linestyle] [linethickness] [color] [markersize]
Specify the bin number. The bin command associates to the nearest file command above it, therefore a file command must appear at some point in cmdfile before the bin command. markertype is one of "circle", "triangle", "square", "hexagon", "fcircle", "ftriangle", "fsquare", "fhexagon", or "none". In addition to these, there are variations with a small line segment drawn through the markertype; these are specified by preceding the geometric type with the letter ’l’, as in "lcircle".

pagelayout


   chanlab-chanlab-... [chanlab-chanlab-...]

endpagelayout
Specify the layout of the plot. Channel refers to electrode channel labels NOT channel numbers. The pagelayout command must be on a line by itself. The channel label specifiers can be on multiple lines, and the endpagelayout command to end the layout description must be on a line by itself. For example, you might specify
pagelayout
f7-l41-wl-o1 cz-pz-bl f8-41-wr-wl
endpagelayout
to make a plot with three groups of connected line segments for the mean amplitude measures of the specified electrodes.

The following is a description of the rest of the commands that can be used in a command file.

starttime time
Specify the start of the time window (ms), which is when to begin calculating the mean amplitude of the ERP. Default is 0.

time_slice time
Specify the duration (ms) of the time window, which is the length of time over which the mean amplitude is to be calculated. Default is 100.

nslices number of plots
Specify the number of graphs that will be calculated. Default is 1.

step_size time
Specify the period (ms) to use for the start of each time window when multiple graphs are calculated. The default is time_slice.

max max amplitude
Specify the maximum amplitude on the y axis of the plot. Default is 10. If max is less than min, the plot will be "reversed" (i.e., smaller amplitudes will be on top of plot, larger amplitudes on bottom).

min min amplitude
Specify the minimum amplitude on the y axis of the plot. Default is -10.

zeroline [y value]
Optional dashed line that runs parallel to the x axis. It can be placed anywhere on the plot. If no y value is given then it is placed at zero.

yticks number of ticks
Specify the number of ticks that will be placed on the y axis. If the number specified results in y tick labels that are non-integer, an appropriate precision (see ytickformat) will automatically be applied to the labels. If both yticks and ytickinterval are specified, ytickinterval has precedence. The default is 0.

ytickinterval interval
Specify the interval (in uV) for placing ticks on the y axis. If the value specified results in y tick labels that are non-integer, an appropriate precision (see ytickformat) will automatically be applied to the labels. If both yticks and ytickinterval are specified, ytickinterval has precedence.

ytickformat precision [color] [linethickness] [textsize] [font]
Specify the format of the tickmarks on the y axis. Precision is the number of digits that should appear after the decimal point for the y tick labels. Note that precision may be overridden as a result of certain values specified by yticks and ytickinterval.    
xtickformat [color] [linethickness] [textsize] [font]
Specify the format of the tickmarks on the x axis.    
title "text" [color] [linethickness] [textsize] [font]
Specify the text that will appear at the top of each plot. The text must be enclosed in quotes. The specified text will be appended with the time window to which the plot appears. Another command, notitletime tells merplot to NOT append the time window to the text string.

text xpos ypos "text" [color] [linethickness] [textsize] [font] [laborigin]
Put a text string at an arbitrary location on the plot page. Xpos and ypos are specified as a fractional portion of the width and height of the plot page respectively. Xpos increases from left to right, and Ypos increases from the bottom of the page to the top. Thus the lower left hand corner of the page has xpos=0, ypos=0; the middle of the plot page has xpos=0.5, ypos=0.5; and the upper right hand corner of the page has xpos=1.0, ypos=1.0.

toplegend "text" [color] [linethickness] [textsize] [font]
Display a legend at the top of the page. Several toplegend commands may appear in a command file, in which case the legends will appear one on top of the other, the first being the topmost. The "text" string can contain marker variables for drawing the various markers at any position in the text string. For example, to draw a filled circle at the beginning of a legend, the toplegend commmand might look like this:
toplegend "%v This is a filled circle" fcircle
As you may have surmised, every occurence of "%v" in the text string must have a corresponding markertype designation (see the bin command) after the text string.

bottomlegend "text" [color] [linethickness] [textsize] [font]
This is essentially the same as the toplegend command, only the legends are displayed at the bottom of the page.

ytitle "text" [color] [linethickness] [textsize] [font]
Specify the text that will appear along the y axis. The text must be enclosed in quotes.

plotsperpage number of plots
Specify the number of plots per page. Default is the number of nslices.

stack
Causes the plots to be all be displayed in one column.
baseline start stop
This command is used to alter the interval used to calculate the baseline voltage which is subtracted from every point in the data prior to measurement. start and stop are decimal integers which denote the beginning and ending latencies (in ms) of the portion of data which are to be averaged together to form the baseline voltage (note: prior to 2008-09-10 the data point corresponding to the stop latency was included in the baseline average; after 2008-09-10 it is excluded). They are relative to stimulus onset, so if one wanted to use the 50 ms prior to stimulus onset as the baseline interval, one would type baseline -50 0. If no interval is specified, the default is to baseline using the presampling period to calculate the baseline voltage.

nobaseline
This command specifies to not subtract a baseline voltage from the data prior to measurement. The default is to baseline using the presampling period to calculate the baseline voltage.

filter filtertype cutoff [cutoff]
Filter the data before measuring. filtertype may be "lp" for lowpass, "hp" for highpass, or "bp" for bandpass. cutoff is the cutoff frequency to use for the filter. If a bandpass filter is used, both a low and high cutoff frequency must be specified.

The parameters enclosed in square brackets are optional, and can appear in any order. They are specified as follows:

font - one of simplex, duplex, complex, or italic.

textsize - textsize=n, where n is a positive number (can have
a decimal point). Note that no spaces are allowed between "textsize", "=", and "n".

color - color=n, where n is a positive integer, which is
device dependent (on monochrome devices, 0 is invisible, 1 is that devices color).

linethickness - one of verythin, thin, medium, thick, or verythick.

linestyle - one of solid, dotted, dashed, or dotdash

markersize - markersize=n, where n is a positive number.
Note that no spaces are allowed between "markersize", "=", and "n".

Author

Rajiv Mannath


Table of Contents