pad | R Documentation |
Pad image with n pixels along specified axis
pad(im, nPix, axes, pos = 0, val)
im |
the input image |
nPix |
how many pixels to pad with |
axes |
which axes to pad along |
pos |
-1: prepend 0: center 1: append |
val |
colour of the padded pixels (default 0 in all channels). Can be a string for colour images, e.g. "red", or "black". |
a padded image
Simon Barthelme
pad(boats,20,"xy") %>% plot
pad(boats,20,pos=-1,"xy") %>% plot
pad(boats,20,pos=1,"xy") %>% plot
pad(boats,20,pos=1,"xy",val="red") %>% plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.