hypo_recolor_svg | R Documentation |
hypo_recolor_svg
redefines the color of a specific svg layer.
hypo_recolor_svg(svg, layer = 1, color = "darkgray")
svg |
svg object (manatory), the svg object |
layer |
integer skalar (optional), the layer to recolor |
color |
string skalar (optional), the new color |
This function redefines the color of a specific svg layer. The svg needs to be read in by hypo_read_svg.
svg_file <- system.file("extdata", "logo.c.svg", package = "hypoimg") svg <- hypo_read_svg(svg_file) svg_new <- hypo_recolor_svg(svg, color = 'red') ggplot() + annotation_custom(grob = svg_new)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.