hypo_read_svg
imports a cairo svg image file.
hypo_read_svg(file_path)
file_path | string skalar (manatory), the cairo svg to import |
---|
This function reads a (cairo) svg file and turns it into a 'grid object' (grob). This can then be used to annotate ggplot plots.
To convert a regular svg into a cairo svg use the grConvert package:
grConvert::convertPicture("image.svg","image.c.svg")
svg_file <- system.file("extdata", "logo.c.svg", package = "hypoimg") svg <- hypo_read_svg(svg_file)