Paul Johnson
2001-Aug-08 16:20 UTC
[R] box doesn't surround words in legend in printed output
I have made a plot with a legend and on the screen it looks fine, but when I save as jpg or pdf, or print, the legend box is too small, it cuts through the words on the right side. I put an example here: http://lark.cc.ukans.edu/~pauljohn/R/apdftest.pdf Is there a work around? -- Paul E. Johnson email: pauljohn at ukans.edu Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn University of Kansas Office: (785) 864-9086 Lawrence, Kansas 66045 FAX: (785) 864-5700 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian Ripley
2001-Aug-08 16:41 UTC
[R] box doesn't surround words in legend in printed output
On Wed, 8 Aug 2001, Paul Johnson wrote:> I have made a plot with a legend and on the screen it looks fine, but > when I save as jpg or pdf, or print, the legend box is too small, it > cuts through the words on the right side. > > I put an example here: > http://lark.cc.ukans.edu/~pauljohn/R/apdftest.pdf > > Is there a work around?You need to tell us a lot more, like which OS, exactly how you saved or printed, etc. My guess though is that you copied from device to device. Don't, use plot directly on the device you wanted. Copying plots does not recalculate boxes for changed point sizes, for example. If you really need to do this you will need to play with the pointsize on the receiving device. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
2001-Aug-08 16:44 UTC
[R] box doesn't surround words in legend in printed output
Paul Johnson <pauljohn at ukans.edu> writes:> I have made a plot with a legend and on the screen it looks fine, but > when I save as jpg or pdf, or print, the legend box is too small, it > cuts through the words on the right side. > > I put an example here: > http://lark.cc.ukans.edu/~pauljohn/R/apdftest.pdf > > Is there a work around?Sort of. The key is that "replaying" graphics is not smart enough when a graph is resized, and this effectively happens when you copy a graph between devices. If your screen image has different (formal) dimensions and pointsize, the stringwidths used for sizing the legend box are not recalculated. You can either generate your plots directly to the target device, or adjust your screen image size to fit the target using the options to x11()/windows(). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._