R/cairosvg.R

Defines functions cairosvg

Documented in cairosvg

#' Cairo SVG for ggsave
#'
#' This function allows you use cairosvg with ggsave - generally gives higher quality results than default svg engine.
#' The function is not called directly, but within ggsave
#' @examples
#' ggplot2::ggsave("folder", plot ,device = cairosvg, width = 25, height = 10, units = "cm")
#' @export


# CairoSVG function for ggplot2 -------------------------------------------
# Solves some issues with standard svg device - mainly usage of symbols
cairosvg <- function(filename, width, height){
  Cairo::CairoSVG(file = filename, width = width, height = height)
}
MarcioFCMartins/MMartins documentation built on Nov. 8, 2024, 4:28 p.m.