Skip to contents

In theory, you can just use ggplot2::ggsave() to save the cartoons plotted by draw_cartoon(). However, you can have trouble finding the best sizes for each cartoon to make them look alike. This function is designed to save the cartoons with self-adjusted sizes, based on the size of the glycans, so that when glycans with different sizes are put together, they will look alike.

Usage

save_cartoon(cartoon, file, dpi = 300)

Arguments

cartoon

A ggplot2 object returned by draw_cartoon().

file

File name of glycan cartoon.

dpi

Dots per inch, default = 300.

Examples

if (FALSE) { # \dontrun{
cartoon <- draw_cartoon("Gal(b1-3)GalNAc(a1-")
save_cartoon(cartoon, "p1.png", dpi = 300)
} # }