Skip to content

Calling save_plot( ) non-interactively via Rscript creates empty Rplots.pdf file #204

@cdupai-bbi

Description

@cdupai-bbi

Similar to this ggsave bug (tidyverse/ggplot2#2787), running save_plot() non-interactively with Rscript in the terminal produces the empty, unwanted file Rplots.pdf.

library(tidyverse)
library(cowplot)

plot_this <- 
  ggplot( data = data.frame( x=c(1,2,4), y = c(2,3,5)))+
  geom_point(aes(x = x ,y = y))
  
save_plot(
  "test.png",
    plot_this ,
    base_height = 6,
    bg = "white")


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions