Learn R Programming

abf2 (version 0.7-1)

plot.abf2: Plot a trace from an abf2 object.

Description

Plots a trace of (portions of) data loaded from an ABF2 file.

Usage

"plot"(x, adc = 1, time = NULL, pts = 1000, type = "s", col = 1, vtags = TRUE, ctags = TRUE, vcol = "grey", ccol = "pink", vlty = "dotted", clty = "dashed", xlab = "Time (s)", ylab = NULL, vText = "bottom", vtunits = FALSE, vtcol = 4, vtpad = 0.1, ...)

Arguments

x
An abf2 object loaded by abfload
adc
Index of the ADC channel to plot from.
time
Optional specifier of a time range to be plotted. By default the full trace is used. If a single numeric value is provided here, it specifies the end time, with the plot starting from the beginning of the trace. Otherwise the trace is plotted from the time[1] to time[2].
pts
The maximum number of sample points to plot. If the trace actually contains fewer samples than this, that smaller number will be plotted. If, as is more common, the trace 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".
col
The colour with which the trace should be plotted.
vtags
Whether to draw lines indicating any voltage changes included in the file tags.
ctags
Whether to draw lines indicating non-voltage tags.
vcol
Line colour with which voltage tag indicators should be drawn.
ccol
Line colour with which non-voltage tag indicators should be drawn.
vlty
Line type with which voltage tag indicators should be drawn.
clty
Line type with which non-voltage tag indicators should be drawn.
xlab
Label for the x-axis of the plot.
ylab
Label for the y-axis of the plot. If NULL (the default), the name and units specified for this ADC in the ABF file header will be used.
vText
String indicating where a text label for voltage change indicators should be drawn. If this is "bottom", labels are drawn at the bottom of the plot, otherwise at the top. To omit labels altogether, set this to NULL.
vtunits
Whether to include units in voltage change labels (if any).
vtcol
Colour to draw the voltage change labels (if any).
vtpad
Padding added to the plot to account for voltage change labels. Alternate label positions are also offset up and down by a fraction of this amount to mitigate against overlap when voltage changes occur close together.
...
Additional parameters passed to plot.

Value

See Also

abfload, plot

Examples

Run this code
## Not run: 
# # load an ABF file
# ab <- abfload()
# 
# # plot a ten second segment of the second channel
# plot(ab, adc=2, time=c(10,20))
# ## End(Not run)

Run the code above in your browser using DataLab