Description Usage Arguments Details Value Examples
Make image from afm map
1 2 |
data |
an "afm_scan" data object |
matrix |
the name of the matrix you want to plot as an image (eg. "Height_Sensor_matrix") |
color |
the colorscale (see details for options) |
normalized |
whether the data is normalized to a (0,1) scale |
When specifying the afm map that you want to plot as an image, you must use the exact name that appears in data$maps, ie. "Height_Sensor_matrix". By default the data will be plotted in greyscale, but there are several options for colors: "nanoscope" is a dupe of the yellow-tan color palette in the nanoscope software; "distinct_rainbow" and "smooth_rainbow" are rainbow palettes with 10 or 256 levels respectively; all palettes from the viridis line are available, eg. "viridis", "magma", etc. By default the data is normalized to a 0-1 scale, this is because EBImage requires data to be scaled to properly apply colors and display the image. If you set this as FALSE there is a good chance your image will be displayed as junk. This function rotates the EBImage output by -90 degrees because the way that EBImage plots things is weird. The output rotation matches the orientation of the scan direction, such that the image appears as it would in the nanoscope software.
an EBImage image object. This image can be viewed using display()
1 2 3 | load("data/two_um_scan.rda")
img <- afm_img(two_um_scan, matrix = "Height_Sensor_matrix", color = "nanoscope")
EBImage::display(img, method = "raster")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.