From af4b46052ca053431afc42174f7411ab34e3785a Mon Sep 17 00:00:00 2001 From: Schultheis Date: Tue, 15 Oct 2019 15:29:03 +0200 Subject: [PATCH] download: use orca for plotly downloads. Requires plotly > 4.8.0. --- DESCRIPTION | 2 +- R/function.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e200cc1..f02bd9e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,7 +16,7 @@ LazyData: true Imports: shiny, data.table, ggplot2, - plotly, + plotly (> 4.8.0), scales, shinydashboard, DT (>= 0.3), diff --git a/R/function.R b/R/function.R index 10b16c3..6648f67 100644 --- a/R/function.R +++ b/R/function.R @@ -1246,8 +1246,8 @@ download <- function(file, filename, plot, width, height, ppi = 72, save_plot = wd <- getwd() on.exit(setwd(wd)) # make sure working directory will be restored setwd(tempdir()) - plotly::export(p = plot, file = plot_file_pdf) - plotly::export(p = plot, file = plot_file_png) + plotly::orca(p = plot, file = plot_file_pdf) + plotly::orca(p = plot, file = plot_file_png) setwd(wd) } else if (class(plot) == "Heatmap") { # TODO: find better way to check for complexHeatmap object # complexHeatmap