Description Usage Arguments Value Examples
image cropping from the center.
1 |
x |
A raster or a matrix |
width |
width for cropping |
height |
height for cropping |
shift |
shift of the cropped position from the center |
A raster or a matrix
1 2 3 4 5 6 7 8 9 | data(camphora)
par(mfrow=c(2,2))
image(rot90c(camphora),col=gray(c(0:255)/255), main="original", useRaster=TRUE, axes=FALSE, asp=1)
image(rot90c(crop(camphora,200,100)),col=gray(c(0:255)/255),
main="cropped from the center", useRaster=TRUE, axes=FALSE, asp=0.5)
image(rot90c(crop(camphora,200,200)),col=gray(c(0:255)/255),
main="cropped from the center", useRaster=TRUE, axes=FALSE, asp=1)
image(rot90c(crop(camphora,200,200,shift=c(50,50))),col=gray(c(0:255)/255),
main="cropped from shifted position c(50,50)", useRaster=TRUE, axes=FALSE, asp=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.