View source: R/add_lines_x3p.R
x3p_add_vline | R Documentation |
Add vertical lines to overlay the surface of an x3p object. Lines are added to a mask. In case no mask exists, one is created.
x3p_add_vline(x3p, xintercept, size = 5, color = "#e6bf98")
x3p |
x3p object |
xintercept |
(vector of) numerical values for the position of the lines. |
size |
width (in pixels) of the line |
color |
(vector of) character values to describe color of lines |
x3p object with added vertical lines in the mask
## Not run:
logo <- x3p_read(system.file("csafe-logo.x3p", package = "x3ptools"))
logo_color <- magick::image_read(system.file("csafe-color.png", package = "x3ptools"))
logoplus <- x3p_add_mask(logo, as.raster(logo_color))
# ten vertical lines across:
logoplus <- x3p_add_vline(logo, seq(0, 740 * 6.4500e-7, length = 5), size = 3)
x3p_image(logoplus, size = c(741, 419), zoom = 0.5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.