Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Merge pull request #1 from HendrikSchultheis/dingbats
Browse files Browse the repository at this point in the history
download: no dingbats
  • Loading branch information
HendrikSchultheis authored Dec 19, 2017
2 parents 00f579c + eeed802 commit ee8f956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/function.R
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ download <- function(file, filename, plot, width, height, ppi = 72, ui = NULL) {
if(ggplot2::is.ggplot(plot)) {
# ggplot

ggplot2::ggsave(plot_file_pdf, plot = plot, width = width, height = height, units = "cm", device = "pdf")
ggplot2::ggsave(plot_file_pdf, plot = plot, width = width, height = height, units = "cm", device = "pdf", useDingbats = FALSE)
ggplot2::ggsave(plot_file_png, plot = plot, width = width, height = height, units = "cm", device = "png", dpi = ppi)
} else if(class(plot)[1] == "plotly") {
# plotly
Expand All @@ -1112,7 +1112,7 @@ download <- function(file, filename, plot, width, height, ppi = 72, ui = NULL) {
setwd(wd)
} else if(class(plot) == "Heatmap") { # TODO: find better way to check for complexHeatmap object
# complexHeatmap
grDevices::pdf(plot_file_pdf, width = width / 2.54, height = height / 2.54) # cm to inch
grDevices::pdf(plot_file_pdf, width = width / 2.54, height = height / 2.54, useDingbats = FALSE) # cm to inch
ComplexHeatmap::draw(plot, heatmap_legend_side = "bottom")
grDevices::dev.off()
grDevices::png(plot_file_png, width = width, height = height, units = "cm", res = ppi)
Expand Down

0 comments on commit ee8f956

Please sign in to comment.