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

Commit

Permalink
download: use orca for plotly downloads. Requires plotly > 4.8.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchultheis committed Oct 15, 2019
1 parent b0dac2c commit af4b460
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LazyData: true
Imports: shiny,
data.table,
ggplot2,
plotly,
plotly (> 4.8.0),
scales,
shinydashboard,
DT (>= 0.3),
Expand Down
4 changes: 2 additions & 2 deletions R/function.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af4b460

Please sign in to comment.