Usage
multiplot(x, adc = 1, duration = 1, start = 0, pts = 1000,
type = "s", single.col = 1, local.col = TRUE, gutter = NULL,
gutter.prop = 0.1, labels = NULL, rotate.labels = 90,
time.scale = 0.2, time.scale.label = paste(time.scale * 1000, "ms", sep = ""),
trace.scale = 5, trace.scale.label = paste(trace.scale, "pA", sep = ""),
scale.col = "grey50", xinset = NULL, xinset.prop = 1/20, ...)
Arguments
x
The abf2
object containing the data, as loaded by abfload
.
adc
The ADC channel from which the trace data should be taken.
duration
The length of the segments, in seconds. (All plotted segments have the same duration.)
start
A vector containing the start times (in seconds) of all the segments within the ADC trace.
pts
The maximum number of points to plot for each segment. If the segment actually contains
fewer samples than this, that smaller number will be plotted. If, as is more common, the
segment contains many more samples, it is downsampled to this number of points.
type
The plot type (see plot
). By default, traces are drawn with the stair-step style "s".
single.col
Colour to plot all trace segments with if local.col
is FALSE
.
local.col
Whether to plot all trace segments in the same colour, as specified with single.col
,
or to use a different colour for each one. The latter can be useful if the figure will be
edited subsequently in a vector graphics editing program.
gutter
The vertical space to insert between trace segments. This is specified in the units of the
y axis, which is often inconvenient. By default the gap is instead calculated proportionally
(see gutter.prop
.)
gutter.prop
The vertical gap between traces, proportional to the largest segment (ie, with the greatest
vertical range). If an explicit value is provided in the gutter
argument, this is
ignored.
labels
Vector of labels to be drawn alongside the trace segments. The values are coerced to character
,
and repeated as necessary. If NULL
(the default) the function will attempt to use the prevailing
voltage for each segment, if that's available from the file tags.
rotate.labels
Angle at which to draw the trace label text (if any). The default (90) draws the labels
parallel to the y axis.
time.scale
The length of the time (horizontal) scale bar, in seconds.
time.scale.label
A text label to draw under the time (horizontal) scale bar. Default is the specified scale bar
length expressed in milliseconds.
trace.scale
Length of the trace (vertical) scale bar, in whatever units the trace is recorded in.
trace.scale.label
A text label to draw alongside the trace (vertical) scale bar. Default is the specified scale
bar length with the assumption that the trace data is in picoamps.
scale.col
Colour in which both the scale bars and their labels will be drawn.
xinset
Amount by which the plot should be offset from the left to allow space for the scale bars,
in seconds. By default this is instead specified proportionally (see xinset.prop
).
xinset.prop
Amount by which the plot should be offset from the left to allow space for the scale bars,
as a fraction of the overall trace width.
...
Further arguments to be passed to plot
. Note that axes and axis labels are explicitly
defined by the function (as empty/absent), so including these again will generate an error.