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

Commit

Permalink
Browse files Browse the repository at this point in the history
download: omit filepath when using orca because it always prepends ab…
…solut path.
  • Loading branch information
HendrikSchultheis committed Oct 16, 2019
1 parent af4b460 commit b315802
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/function.R
Expand Up @@ -1246,8 +1246,9 @@ 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::orca(p = plot, file = plot_file_pdf)
plotly::orca(p = plot, file = plot_file_png)
# Omit file path because orca adds it regardles of it already being there.
plotly::orca(p = plot, file = basename(plot_file_pdf))
plotly::orca(p = plot, file = basename(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 b315802

Please sign in to comment.