## S3 method for class 'afmdata'plot(x, y =NULL, vs ="Z", segment ="all",...)
Arguments
x: An object of afmdata class.
y: Variable added for compatibility with plot.
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 vs is set to "Time", then it plots a Force-Time curve.
segment: The segment of the curve to be plotted. If segment = "all" then all segments of the curve are plotted. Possible values are: "approach", "pause", "retract" and "all".
...: Additional parameters to be pased to the ggplot functions.
Examples
# Loading the datapath <- 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 pointsdata <- afmContactPoint(data, width =20, mul1 =1, mul2 =10)data <- afmDetachPoint(data, width =40, mul1 =3, mul2 =20)# Making the baseline correctiondata <- afmBaselineCorrection(data)# Plot once the baseline correction is doneplot(data)# Plotting only retract segmentplot(data, segment ="retract")# Plotting the pause segment: Force vs Timeplot(data, segment ="pause", vs ="Time")