[R] tyring to save plots using windoze 7 and cygwin

Mike Marchywka marchywka at hotmail.com
Sun Oct 3 16:54:29 CEST 2010








----------------------------------------
> Date: Sat, 2 Oct 2010 16:35:03 -0700
> Subject: Re: [R] tyring to save plots using windoze 7 and cygwin
> From: jwiley.psych gmail.com
> To: marchywka at hotmail.com
> CC: r-help at r-project.org
>
> Hi Mike,
>

> > sessionInfo()
> R version 2.11.1 (2010-05-31)
> x86_64-pc-mingw32


> sessionInfo()
R version 2.11.1 (2010-05-31)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
>




> ######################################
> # Initialize pdf (or whatever) device
> pdf("myfile.pdf")
> # plot your graph
> plot(xyz, main="imp rate", xlab="Time(GMT)",ylab="imp/minute")
> # add the grid lines
> grid()
> # shut the device down
> dev.off()
> ########################################


yes, that works fine thanks. I guess it has been a while :)

Hopefully now I can find the 3D plotting stuff and other things
I need as I seem to
recall many years ago it took a while to find...

Thanks.





>
> You would use a similar process for postscript(), png(), etc. What
> version of R are you using? I do not have the save.plot() function
> (at least in the packages that load by default). You can learn more
> by poking around the help pages ?dev.copy ?Devices ?windows
>
> HTH,
>
> Josh
>
> On Sat, Oct 2, 2010 at 3:43 PM, Mike Marchywka  wrote:
> >
> >
> > Hi,
> > I'd been using R in the past and recently installed it on a new windoze 7 machine.
> > There have been many issues with compatibility and 32/64 bit apps etc and I did
> > find on google on isolated complaint that saveplot failed in scripts a long time ago.
> > R seems to work fine except script-based plot saving as pdf has not worked.
> > I have tried the following, none of which seem to function,
> >
> >
> > xyz <-read.table("time_frac2")
> > x=plot(xyz,main="imp rate", xlab="Time(GMT)",ylab="imp/minute")
> > grid()
> >
> > dev2bitmap("xxx.pdf",type="pdfwrite")
> > save.plot(x,file="xxx.pdf",format="pdf")
> > dev.copy("pdf","auto_pdf.pdf")
> > dev.off()
> > savePlot("./auto_hit_rate.pdf",type="pdf")
> >
> > q()
> >
> >
> >
> > Now apparently R does save the plot in a default file Rplots.pdf which is
> > just fine for my immediate needs but this may have limitations for future
> > usages.
> >
> > Just curious to know what other may have gotten to work or not work.
> > Thanks.
> >
> > - - - - - -
> >
> > Mike Marchywka | V.P. Technology
> >
> > 415-264-8477
> > marchywka at phluant.com
> >
> > Online Advertising and Analytics for Mobile
> > http://www.phluant.com
> >
> >
> >
> >
> > ______________________________________________
> > 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.
> >
>
>
>
> --
> Joshua Wiley
> Ph.D. Student, Health Psychology
> University of California, Los Angeles
> http://www.joshuawiley.com/
 		 	   		  


More information about the R-help mailing list