Re: [R] Plotting a Trivial Matrix
What about http://www.phaget4.org/R/image_matrix.html try function "f.matrix.plot" Tobias Mathow Forest Research Institute Baden-Wuerttemberg (FVA) Wonnhaldestr. 4, D- 79100 Freiburg Phone: ++49-761-4018-365 www.fva-bw.de -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Lorenzo Isella Gesendet: Freitag, 26. Februar 2010 09:30 An: r-help Betreff: [R] Plotting a Trivial Matrix Dear All, Consider a matrix (N x N) where each entry is either zero or one (can hardly get any simpler). Now, I would like to plot it as a 'chessboard' where every matrix entry is a black (1) or white (0) square. Whatever tool I use to plot it, it should not try to interpolate the data at all. I found some online references http://www.phaget4.org/R/image_matrix.html but probably I can resort to something much simpler. Can anyone provide me with a simple example I can modify later on? Many thanks Lorenzo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] axis label using expression()
Probably a very simple problem: I want to annotate a plot axis with a name of my data using expression(). The name for the data is $\hat P4_k$ written in LaTex style -> hat symbol above P, followed by a 4 and a subscripted k index I tried to write this using x<-c(1,2,3,4) y<-c(3,5,7,9) plot(x,y,xlab=expression(hat(P4[k])) ) but cant find a way to force the hat symbol to be located only above the P symbol and not above the 4 symbol. I have spent some time looking up ?expression, ?plotmath as well as some other R docu but cannot find a way. Any help is greatly appreciated. Regards, toby [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.