How to eliminate the generation of "Rplots.pdf"?

2,516 views
Skip to first unread message

Peng Yu

unread,
Jun 2, 2011, 6:30:20 PM6/2/11
to ggplot2
Hi,

The following code always generate a file called 'Rplots.pdf'. Such a
file can be just removed as shown in the code on the following link.
But I'm wondering if there a way not to generate such a redundant file
in the first place?

library(ggplot2)
tmp=data.frame(V1=rnorm(10)
, V2=rnorm(10)
)
p=qplot(V1,V2,data=tmp)
ggsave(p, file='outfile.png')

http://www.bioinf.uni-freiburg.de/Lehre/Courses/2010_SS/P_Einf_Bioinfo/exercises/sheet6-example_perl_code

--
Regards,
Peng

Ista Zahn

unread,
Jun 2, 2011, 7:26:22 PM6/2/11
to Peng Yu, ggplot2
Your code doesn't generate Rplots.pdf on my system. Are you running
your code through Sweave?

> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>

--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org

Peng Yu

unread,
Jun 2, 2011, 9:25:01 PM6/2/11
to Ista Zahn, ggplot2
Hi,

I forgot to mention that I use Rscript like the following.

Rscript file.R

--
Regards,
Peng

Xianjun Dong

unread,
Jul 16, 2014, 11:19:33 AM7/16/14
to ggp...@googlegroups.com, iz...@psych.rochester.edu
HI, 

I got the same problem when I use Rscript xxx.R where in my xxxx.R script I used ggsave("output.pdf"). It will genearate two files, one is output.pdf, and the other is Rplots.pdf. Not a big deal, but very annoying!

Thanks

-Xianjun

Linus J Fernandes

unread,
Feb 12, 2020, 6:38:50 AM2/12/20
to ggplot2

Linus J Fernandes

unread,
Feb 14, 2020, 10:03:17 AM2/14/20
to ggplot2
Reply all
Reply to author
Forward
0 new messages