[R] plotting text on a postscript device
Peter Malewski
y0004379 at tu-bs.de
Thu Sep 30 11:27:44 CEST 1999
Dear Carlo,
have you closed the postscript-device?
The code:
postscript("c:/temp/temp.eps")
> plot(0,0)
> text(0,0,"xx")
> dev.off()
null device
works fine at my windows r-65
The other possibilty is to
dev.print(postscipt,file="" ...
P
On Wed, 29 Sep 1999, Carlo Maley wrote:
> It seems that the text command isn't working for a postscript device.
> Here is my code:
>
> #-----------------------------
> # I have stored some data in a 21 by 21 matrix called mat
>
> x <- 1:ncol(mat);
> y <- 1:nrow(mat);
> labs <- c(" ", "1298", "1537", "TP53", "786", "974", "1303", "1288",
> "1294", "1293", "1290", "1301", "9GATA", "935", "925", "932", "1121",
> "1118", "301", "930", " ")
>
> postscript(file="corr-markers.eps", paper="letter", family="Times",
> horizontal=F,append=T,onefile=F);
>
> image(x, y, mat, zlim=c(-1,1), col =
> rev(rainbow(100,s=1,v=1,gamma=1,start=0,end=.6)), axes = FALSE,
> xlab="", ylab="", main="Correlations of Marker LoH")
> text(x,rep(0.5,time=length(x)),labels=labs,srt=315,adj=0)
> text(rep(0,time=length(x)), y, labels=rev(labs));
>
> #-----------------------------
>
> When I do this without the postscript command, I get a nice image with
> all the text labels, but when I do this with the postscript command,
> only the image makes it into the file.
>
> I've even tried dev.print and dev.copy but the same behavior occurs.
>
> Can anyone help? I've beat against this for hours now.
>
> thanks, Carlo Maley
>
***************************************************************************
P.Malewski Tel.: 0531 500965
Maschplatz 8 Email: P.Malewski at tu-bs.de
************************38114 Braunschweig********************************
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list