[R] Putting obejct into Graph title
Thomas Lumley
tlumley at u.washington.edu
Tue May 7 17:25:05 CEST 2002
On Tue, 7 May 2002, hkimscil wrote:
> Hello all -
>
> If I want to put mean value of a matrix into the title or subtitle of a graph, how would I do this? For example, in a set of commands like below,
>
> > m.mean<-mean(m)
> > gplot (m, thresh=m.mean)
> > title (main="A2. Block Density of Matrix m\nplotted based on MDS",
> + sub="lines below mean density (**0.435**) suppressed")
>
> I want to ask [R] to put the mean value (whatever it is, calulated as
> m.mean) into subtitle automatically, instead of my writing **0.435**.
>
> Is it possible?
Yes, it's even easy.
title(sub=paste("lines below mean density (",m.mean,")
suppressed",sep=""))
-thomas
Thomas Lumley Asst. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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