[R] Produce a multiple formats graphic

Gabor Grothendieck ggrothendieck at gmail.com
Tue Nov 6 17:30:55 CET 2007


You didn't mention your platform but if its windows then try this:

plot(1:10)
for(p in c("ps", "pdf", "jpg")) savePlot("myplot", type=p)

and if not look up ?dev.copy and RSiteSearch("dev.copy")


On Nov 6, 2007 9:18 AM, Cuvelier Etienne <ecu at info.fundp.ac.be> wrote:
> Is it possible to produce the same graphic in different formats
> in one shot?
> Now if I want to produce the same graphic in pdf, ps and jpeg
> I run the producing code, but I change the graphic device, and
> I choose successively :
> pdf(...)
> ps(...)
> jpeg(...)
>
> So in this case I run the same code 3 times, or I have
> to choose a format and use converters...
>
> Is it possible to produce the 3 graphics in once ?
>
>
> Thank you very much
>
> --
> ===============================================
> Cuvelier Etienne
> Assistant
> FUNDP - Institut d'Informatique
> rue Grandgagnage, 21   B-5000 Namur (Belgique)
> tel: 32.81.72.49.93    fax: 32.81.72.49.67
> ===============================================
> Top 10 reasons to become a Statistician
>
>  1. Deviation is considered normal
>  2. We feel complete and sufficient
>  3. We are 'mean' lovers
>  4. Statisticians do it discretely and
>     continuously
>  5. We are right 95% of the time
>  6. We can legally comment on someone's
>     posterior distribution
>  7. We may not be normal, but we are
>     transformable
>  8. We never have to say we are certain
>  9. We are honestly significantly different
>  10. No one wants our jobs
>
> ______________________________________________
> 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