[R] Save multiple plots in a single pdf file when the plots are generated by a single plot command

R. Michael Weylandt michael.weylandt at gmail.com
Sat Jun 16 00:48:44 CEST 2012


On Fri, Jun 15, 2012 at 4:39 PM, Debs Majumdar <debs_stata at yahoo.com> wrote:
> Hi,
>
> I am trying to save multiple plots in a single pdf file when  the plots are generated by a single plot command. I am using the "lordif" package which generates multiple plots with one command.
>
> pdf("education.pdf")
> plot.lordif(ed_dif, labels = c("White", "African American"))
> dev.off()
>
> And this is not working at all. Thanks for your help.

What do you mean by this? Is it the file not being created? Or its
blank? Or you get the wrong output? Does it work to print to a screen
device but not a pdf? Etc.

Running the example in ?lordif, this works for me:

pdf("test.pdf")
plot(age.DIF)
dev.off()

What OS are you on and what version of R?

In short, happy to help, but we need (much) more information.

Michael

>
> Debs
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list