Hi all Humbly begging forgiveness for bothering the list with yesterday's lame--arsed question. Postscript, being a vector graphics file format, is, um, resolution independant. The problem as Peter pointed out was with the gimp, which defaults to 100dpi resolution when viewing postscript files. I have another (lame?) question. I have noted that when I produce a graph with multiple plots (e.g. 2x2 plots on the graphics device) where each plot has multiple series and a legend with reasonable amounts of text describing the series, the right hand side of the box surrounding the legend always seems to be drawn through the legend text when I write the output to a postscript file. The image displayed by the x11 device on screen seems fine, with the legend box drawn neatly around the legend text. I have tried altering the character size and location of the legend text inside the legend function (cex options etc) without success, i.e. although the legend box may be drawn neatly on the x11 device on screen, it cuts the legend text when the output is written to a postscript file whatever I try. Suggestions? MJM Michael J. Manning Stock Monitoring and Data Services National Institute of Water and Atmospheric Research Ltd (NIWA) PO Box 14901, Kilbirnie Wellington, New Zealand Tel. 64 4 386 0300 Fax. 64 4 386 0574 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"Michael J. Manning" wrote:> > Hi all > > Humbly begging forgiveness for bothering the list with yesterday's > lame--arsed question. Postscript, being a vector graphics file format, > is, um, resolution independant. The problem as Peter pointed out was > with the gimp, which defaults to 100dpi resolution when viewing > postscript files. > > I have another (lame?) question. I have noted that when I produce a > graph with multiple plots (e.g. 2x2 plots on the graphics device) > where each plot has multiple series and a legend with reasonable > amounts of text describing the series, the right hand side of the box > surrounding the legend always seems to be drawn through the legend > text when I write the output to a postscript file. The image > displayed by the x11 device on screen seems fine, with the legend > box drawn neatly around the legend text. I have tried altering the > character size and location of the legend text inside the legend > function (cex options etc) without success, i.e. although the legend > box may be drawn neatly on the x11 device on screen, it cuts the > legend text when the output is written to a postscript file whatever I > try.Use the argument text.width, e.g. plot(1:10) legend(1, 10 , legend="anything") # now more space: legend(1, 8, legend="anything", text.width = strwidth("else") * 2) Uwe -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 You might want to check that paper="letter" (the default seems to be "a4", which, for me, has the same behavior you see: find graphics X11 windows, truncated paper output). - -Aaron On Tue, 11 Dec 2001, Michael J. Manning wrote:> Hi all > > Humbly begging forgiveness for bothering the list with yesterday's > lame--arsed question. Postscript, being a vector graphics file format, > is, um, resolution independant. The problem as Peter pointed out was > with the gimp, which defaults to 100dpi resolution when viewing > postscript files. > > I have another (lame?) question. I have noted that when I produce a > graph with multiple plots (e.g. 2x2 plots on the graphics device) > where each plot has multiple series and a legend with reasonable > amounts of text describing the series, the right hand side of the box > surrounding the legend always seems to be drawn through the legend > text when I write the output to a postscript file. The image > displayed by the x11 device on screen seems fine, with the legend > box drawn neatly around the legend text. I have tried altering the > character size and location of the legend text inside the legend > function (cex options etc) without success, i.e. although the legend > box may be drawn neatly on the x11 device on screen, it cuts the > legend text when the output is written to a postscript file whatever I > try. > > Suggestions? > > MJM > > > Michael J. Manning > Stock Monitoring and Data Services > National Institute of Water and Atmospheric Research Ltd (NIWA) > PO Box 14901, Kilbirnie > Wellington, New Zealand > Tel. 64 4 386 0300 > Fax. 64 4 386 0574 > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (OSF1) Comment: For info see http://www.gnupg.org iD8DBQE8FTZOt6Sp9Om+GYMRAmzMAJ9YLK9Ay/Jy73Zbf9KiACCw7XBClQCaAutR iF6QS9p3d8Lfm4y9Sety7TQ=mZmA -----END PGP SIGNATURE----- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hello Uwe On 10 Dec 2001, at 22:49, Uwe Ligges wrote:> > Use the argument text.width, e.g. >where text.width is set to the largest (i.e. longest) text string in a vector of strings to be drawn on the legend, in combination with tweaking cex works fine, e.g. plot(...) legend(30,0.375,legend=c("Male (n=162)","Female (n=976)"), col=c("blue","red"),lty=1,cex=0.8,text.width=strwidth("Female (n=976)")) Thanks muchly MJM Michael J. Manning Stock Monitoring and Data Services National Institute of Water and Atmospheric Research Ltd (NIWA) PO Box 14901, Kilbirnie Wellington, New Zealand Tel. 64 4 386 0300 Fax. 64 4 386 0574 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
"Michael J. Manning" wrote:> > ...I have another (lame?) question. I have noted that when I producea> graph with multiple plots (e.g. 2x2 plots on the graphics device) > where each plot has multiple series and a legend with reasonable > amounts of text describing the series, the right hand side of the box > surrounding the legend always seems to be drawn through the legend > text when I write the output to a postscript file.I've noticed the same problem when using dev.print() to produce a postscript file. Interestingly, using postscript() directly seems to avoid it, although I haven't had the time to discover why. Jim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._