Hello, I run R on Windows 2000. When I load lattice library and plot some lme class objects, the graphic window displays a dark-green color. Graphics look ok on the screen, but lines and points become invisible whem I send the plot to a printer because of the background color. Are there ways to reset the background color? Both par(bg=) and windows() do not work. Any ideas? Richard -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> -----Original Message----- > From: owner-r-help at stat.math.ethz.ch > [mailto:owner-r-help at stat.math.ethz.ch]On Behalf Of Yang, Richard > Sent: Friday, 30 November 2001 08:22 > To: r-help at r-project.org > Subject: [R] Reset trellis plot backgroud color > > Hello, > > I run R on Windows 2000. When I load lattice library and plot > some lme class > objects, the graphic window displays a dark-green color. Graphics > look ok on > the screen, but lines and points become invisible whem I send the > plot to a > printer because of the background color. Are there ways to reset the > background color? Both par(bg=) and windows() do not work. Any ideas?Richard, I have found the same doing some plots yesterday, only that I saved the plot to a postscript file from the graphics window for inclusion in a LaTeX report. The only way I could get the background to be white was by using trellis.device(postscript,file="lattice1.ps",color=TRUE,bg="white") ... dev.off() which seems to work fine. Cheers, Andreas (running WinNT4, R1.3.1, lattice 0.3-0, grid 0.2) --- Andreas Kiermeier Senior Biometrician BiometricsSA (Adelaide University/SARDI) GPO Box 397, Adelaide, SA 5001, Australia Email: Andreas.Kiermeier at adelaide.edu.au WWW: http://www.BiometricsSA.adelaide.edu.au/ Ph: +61 8 8303 6819 Fax: +61 8 8303 6761 ----------------------------------------------------------- This email message is intended only for the addressee(s) and contains information which may be confidential and/or copyright. If you are not the intended recipient please do not read, save, forward, disclose, or copy the contents of this email. If this email has been sent to you in error, please notify the sender by reply email and delete this email and any copies or links to this email completely and immediately from your system. No representation is made that this email is free of viruses. Virus scanning is recommended and is the responsibility of the recipient. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Richard, At 04:51 PM 11/29/2001 -0500, Yang, Richard wrote:>I run R on Windows 2000. When I load lattice library and plot some lme class >objects, the graphic window displays a dark-green color. Graphics look ok on >the screen, but lines and points become invisible whem I send the plot to a >printer because of the background color. Are there ways to reset the >background color? Both par(bg=) and windows() do not work. Any ideas?You can open a trellis device directly, specifying color=F; see help(trellis.device). This is a good solution if you are satisfied with monochrome printed plots. I hope that this helps, John ----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: jfox at mcmaster.ca phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox ----------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
The device that starts up by default is not meant for printing; for that you should explicitly start a new device. And this should be done by calling the trellis.device() function. This function has a parameter called bg. So, to start a pdf device with a white background, try trellis.device("pdf", bg = "white") Just calling trellis.device(bg = "white") should start a windows() device with a white background, if that's what you want. --- "Yang, Richard" <dyang at nrcan.gc.ca> wrote:> Hello, > > I run R on Windows 2000. When I load lattice library > and plot some lme class > objects, the graphic window displays a dark-green > color. Graphics look ok on > the screen, but lines and points become invisible > whem I send the plot to a > printer because of the background color. Are there > ways to reset the > background color? Both par(bg=) and windows() do not > work. Any ideas? > > > Richard >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-> r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: > r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.___________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._