knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(nanoscopeAFM) library(ggplot2)
This example illustrates how to extract force versus distance spectroscopy data from Park AFM images:
f = AFM.getSampleImages('force') a = AFM.import(f) a = AFM.flatten(a) plot(a) + labs(fill="z (nm)")
Spectroscopy data files are recognized as such:
AFM.dataType(a)
The file can be graphed like a regular AFM file, but additionally, it contains the spectroscopy data. Several channels are recorded:
AFM.specHeader(a)
The data from these channels is extracted as follows:
df = AFM.specData(a) ggplot(df, aes(`Z Scan`, Force, col=factor(Point))) + geom_point() + theme_bw() + theme(legend.position = c(0.95,0.99), legend.justification = c(1,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.