plot.afmdata {afmToolkit} | R Documentation |
Plot an afmdata object
Description
Plots an afmdata object.
Usage
## S3 method for class 'afmdata'
plot(x, y = NULL, vs = "Z", segment = "all", ...)
Arguments
x |
An object of |
y |
Variable added for compatibility with |
vs |
The variable for the x-axis. May take the values "Time" or "Z". It defaults
to "Z", plotting thus a Force-Distance curve. If |
segment |
The segment of the curve to be plotted. If |
... |
Additional parameters to be pased to the ggplot functions. |
Examples
# Loading the data
path <- path.package("afmToolkit")
data <- afmReadJPK("force-save-JPK-3h.txt.gz", path = path)
# Standard plot (out of the box)
plot(data)
# Computing the contact and detach points
data <- afmContactPoint(data, width = 20, mul1 = 1, mul2 = 10)
data <- afmDetachPoint(data, width = 40, mul1 = 3, mul2 = 20)
# Making the baseline correction
data <- afmBaselineCorrection(data)
# Plot once the baseline correction is done
plot(data)
# Plotting only retract segment
plot(data, segment = "retract")
# Plotting the pause segment: Force vs Time
plot(data, segment = "pause", vs = "Time")
[Package afmToolkit version 0.0.1 Index]