hypo_recolor_svg: Recolor a svg layer

hypo_recolor_svgR Documentation

Recolor a svg layer

Description

hypo_recolor_svg redefines the color of a specific svg layer.

Usage

hypo_recolor_svg(svg, layer = 1, color = "darkgray")

Arguments

svg

svg object (manatory), the svg object

layer

integer skalar (optional), the layer to recolor

color

string skalar (optional), the new color

Details

This function redefines the color of a specific svg layer. The svg needs to be read in by hypo_read_svg.

Examples

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)


k-hench/hypoimg documentation built on June 2, 2022, 1:49 a.m.