View source: R/AFM.lineProfile.R
AFM.lineProfile | R Documentation |
create a profile data line across an image (d), providing
the starting point (x1,y1) and end point (x2,y2). The start and end
points are provided in units of nanometers or pixels. If the starting
and end point coordinates are not provided, it will use the raster::click()
function to prompt the user to click on two points on the graph.
AFM.lineProfile( obj, x1 = NA, y1 = NA, x2 = NA, y2 = NA, unitPixels = FALSE, verbose = FALSE )
obj |
AFMdata object |
x1 |
start x position in units of nm/pixels from bottom left, if |
y1 |
start y position in units of nm/pixels from bottom left, if |
x2 |
end x position in units of nm/pixels from bottom left, if |
y2 |
end y position in units of nm/pixels from bottom left, if |
unitPixels |
logical, if |
verbose |
logical, if |
AFMdata object with line data, use AFM.linePlot()
to graph / tabulate data or plot(addLines=TRUE)
to graph image with lines
Thomas Gredig
AFM.getLine
, AFM.linePlot
, plot.AFMdata
afmd = AFM.artificialImage(width=128, height=128, type='calibration', verbose=FALSE) AFM.lineProfile(afmd, 100, 500, 900, 500) -> afmd2 AFM.linePlot(afmd2) AFM.lineProfile(afmd, 1, 1, 128, 128, unitPixels=TRUE) -> afmd2 AFM.linePlot(afmd2) head(AFM.linePlot(afmd2, dataOnly=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.