Dear R experts, R (0.63) does not seem to write me any text in a PS file. Trying x11() plot(12) text(5,5, "Hello World") works fine. Now I would like to have the same as a PS file. postscript("foobar.ps") plot(12) text(5,5,"Hello World") dev.off() Gives me a PS file with the plot -- but without the "Hello World". Why? I'm completely clueless. Ciao & thanks Armin ---------------------------------------------------------------------------- Department of Mathematics | email: Armin.Roehrl at epfl.ch Swiss Federal Institute of Technology | http://statwww.epfl.ch/people/roehrl 1015 Lausanne, Switzerland | Tel.: ++41 (0) 21 693 5508 ---------------------------------------------------------------------------- The real problem is not whether machines think, but whether men do. B. F. Skinner -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Armin S. A. Roehrl
1999-Apr-22 01:00 UTC
[R] Re: text works with the postscript device? Getting really confused
Sorry -- that does indeed work (I'm getting tired), if you put text(1,5) - you see it, but I do have several problems generating PS files. For what I do, I can't use the axis function - so I use the text command to put the text under the x-axis. i.e. x11(); plot(12); text(1,6, "test"); This works - fine in x11() mode -- but running the same in postscript("foobar") mode - fails -- It simply doesn't get printed. Playing with mtext instead of text -- I noted that mtext appears in the PS file. With mtext I can't set the y coordinate (right?), so I change the margin par(mar=c(0.4, 4.1, 4.1, 2.1)) and and the mtext with side=1 is close enough to the x-axis to display the text under the ticks for the x-axis. Doing the same in PS mode - I do not seem to succeed to change the par(mar-c(..)) I get no error message, but looking at the output nothing has changed, i.e. the "default margin size" seems not to be changeable for the PS device? Thak you very much for any help Armin, trying to make PS files. "Armin S. A. Roehrl" wrote:> Dear R experts, > > R (0.63) does not seem to write me any text in a PS file. > Trying > > x11() > plot(12) > text(5,5, "Hello World") > > works fine. > > Now I would like to have the same as a PS file. > postscript("foobar.ps") > plot(12) > text(5,5,"Hello World") > dev.off() > > Gives me a PS file with the plot -- but without the > "Hello World". > > Why? I'm completely clueless. > > Ciao & thanks > Armin > > ---------------------------------------------------------------------------- > Department of Mathematics | email: Armin.Roehrl at epfl.ch > Swiss Federal Institute of Technology | http://statwww.epfl.ch/people/roehrl > 1015 Lausanne, Switzerland | Tel.: ++41 (0) 21 693 5508 > ---------------------------------------------------------------------------- > The real problem is not whether machines think, but whether men do. B. F. Skinner-- Ciao Armin ---------------------------------------------------------------------------- Department of Mathematics | email: Armin.Roehrl at epfl.ch Swiss Federal Institute of Technology | http://statwww.epfl.ch/people/roehrl 1015 Lausanne, Switzerland | Tel.: ++41 (0) 21 693 5508 ---------------------------------------------------------------------------- The real problem is not whether machines think, but whether men do. B. F. Skinner -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._