View source: R/plot.bm_bitmap.R
plot.bm_bitmap | R Documentation |
plot.bm_bitmap()
plots a bitmap object to the graphics device.
It is a wrapper around grid::grid.raster()
and as.raster.bm_bitmap()
which converts a bitmap glyph object to a raster object.
## S3 method for class 'bm_bitmap' plot(x, ..., col = c("grey80", "black", "grey40"), interpolate = FALSE) ## S3 method for class 'bm_bitmap' as.raster(x, ..., col = c("grey80", "black", "grey40"))
x |
A |
... |
Passed to |
col |
Character vector of R color specifications. |
interpolate |
Passed to |
A grid
rastergrob grob object silently.
As a side effect will draw to graphics device.
bm_bitmap()
, as.raster.bm_bitmap()
font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon") font <- read_hex(font_file) capital_r <- bm_extend(font[[str2ucp("R")]], left = 1L) capital_r <- bm_extend(capital_r, sides = 1L, value = 2L) # add a border effect plot(capital_r) grid::grid.newpage() plot(capital_r, col = c("yellow", "blue", "red"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.