Thanks to all who replied. Mostly the suggestion was to add the argument horizontal= FALSE to the postscript function. However, I was trying to generate a landscape graph. The "fault" lies with gs as Peter Dalgaard pointed out. Under Windows 95, gsview has an option to view landscape or portrait and therefore this problem does not arise on that platform. partha_bagchi at hgsi.c om To: r-help at stat.math.ethz.ch Sent by: cc: owner-r-help at stat.ma Subject: [R] R-Graphics th.ethz.ch 07/26/1999 04:51 PM I am having a strange problem with R graphics: I am testing out R on a Sun Solaris machine. I generate a simple postscript graph as: postscript(file="temp.ps", paper= "letter") plot(c(1:10), xlab= "index", ylab= "Cell Count") title("Generic Test of R-Graphics") dev.off() When I view the temp.ps file with gs (version 5.50) I get the graph rotated by at least 90 deg. Is this a bug or have I missed something? TIA.> version_ platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status status.rev 0 major 0 minor 64.1 year 1999 month May day 8 language R>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 27 Jul 1999 partha_bagchi at hgsi.com wrote:> Thanks to all who replied. Mostly the suggestion was to add the argument > horizontal= FALSE to the postscript function. However, I was trying to > generate a landscape graph. The "fault" lies with gs as Peter Dalgaard > pointed out. Under Windows 95, gsview has an option to view landscape or > portrait and therefore this problem does not arise on that platform.Oh yes, it does, if you use gs not gsview on Windows (as you can). As Peter pointed out, on Solaris you can use ghostview (I think he said gv, but that is not so easily compilable on Solaris: it comes with Linux but needs an X11 toolkit that Solaris does not come with, and has `cleaner' human interface IMHO) or CDE's (or OpenLook's) *.ps viewer. The trick with gs is to tell it you want a landscape page: everywhere that has the courtesy to respect international standards (Ineternational Standards Organisation a4, no less) this need gs -g842x595. In North American, RTFM (.../ghostscript/doc/Use.htm). -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear R-Users, one more advice for those who produce .ps-files with R (on unix-machines) and want to insert them in MS-Word: It is not enough to include the argument horizontal= FALSE in the postscript function. The width-option has to be set small enough so that the plot fits (in upright position) on a ("portrait") a4 paper (or letter paper). Otherwise R obviously adjusts the width-parameter, so that this condition is fullfilled, and the width and height of the plot may not have the proportions intended by the user. E.g. : postscript(file="figtest.ps",width=8,height=6.4,horizontal=FALSE) Then the file can be transferred to the Windows computer, and after adding bounding boxes and a preview with Ghostview (the "PS to EPS" and "Add EPS Preview" commands are well documented in the online help) the file should be ready for inserting in MS-Word. WK ---------------------------------------------------------- Wolfgang Koller, koller2 at fgr.wu-wien.ac.at Research Institute for European Affairs Vienna University of Economics and Business Administration Althanstrasse 39-45, 1090 Vienna, Austria -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>Then the file can be transferred to the Windows computer, and after >adding bounding boxes and a preview with Ghostview (the "PS to EPS" >and "Add EPS Preview" commands are well documented in the online >help) the file should be ready for inserting in MS-Word.The Ghostview documentation also makes the point that the "initclip" operator should not be used in EPS files, or files you convert to EPS using the "PS to EPS" command. It's worth noting that the postscript produced by R _does_ use the initclip operator, despite the fact that the postscript() help page suggests R postscript is EPS compatible. (I'm currently on R 0.64.1 win32). That said, I've had very few problems using the postscript produced by R in either MS word or latex documents. R postscript does include a bounding box, so it is often unnecessary to run it through ghostview, especially if you don't need a preview image added. As I recall the one.page=T argument to the Splus postscript device caused fully compliant EPS to be produced, which could potentially be a useful feature for R. David Middleton dajm at deeq.demon.co.uk -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._