plot2D.zoom | R Documentation |
Takes in an array object, T_{m,n,p}
.
Also requires centre of the zoom area, given by center
and the expected zoom dimensions Del_X
and Del_Y
.
Then, it returns the subsetted array in accordance to the zoom requirements set by center
, Del_X
and Del_Y
plot2D.zoom(arr, center, Del_X, Del_Y, pl = T)
plot2D.zoom(arr, center, Del_X, Del_Y)
plot2D.zoom(arr, center, Del_X, Del_Y, pl = F)
arr |
The array object, |
center |
Two element vector denoting the |
Del_X |
The length of the zoomed image along the X-axis |
Del_Y |
The length of the zoomed image along the Y-axis |
pl |
Plots the new array if |
See the image below.
The returned value is necessarily an array of the same structure as arr
Chitran Ghosal
img_2_arr
library(StatsChitran)
dat <- system.file("extdata", "STM.png", package = "StatsChitran")
arr1 <- img_2_arr(source.png = dat, x.lim = c(0, 19), y.lim = c(0,19)) #The image array
arr.zoom <- plot2D.zoom(arr = arr1, center = c(16, 12), Del_X = 6, Del_Y = 6) #The zoomed in array
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.