Rau, Roland <Rau <at> demogr.mpg.de> writes:

> I am trying to plot some text in bold face which works fine:
> 
> plot(0:1,0:1,type="n")
> text(x=0.5, y=0.5, labels=expression(bold("the-actual-string")))
> 
> Now when I try to do the following, the displayed text reads thestring:
> 
> thestring <- "the-actual-string"
> plot(0:1,0:1,type="n")
> text(x=0.5, y=0.5, labels=expression(bold(thestring)))
> 

"expression" can be mind twisting. For a probably more realistic example, 
see the following:

plot(0:1,0:1,type="n")
ss1 = paste("there was ",expression(Delta))
ss = substitute(paste("there was ",expression(Delta)))
text(x=0.3, y=0.3, labels=ss1)
text(x=0.4, y=0.4, labels=ss)


Dieter

______________________________________________
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.

Reply via email to