On Jun 7, 2013, at 8:38 AM, Shane Carey wrote:

> Hi,
> 
> I have a plot with horizontal lables on the x-axis. For example:
> Devonian volcanic rocks
> n=2
> 
> with n=2 on a new line. How do I centre n=2 under the " Devonian volcanic
> rocks  "
> label?
> 
> This was my code: text(axis_text, par("usr")[three], labels = paste(LABELS,
> " \n ", " n =", t(t(name.count[,two]))), srt = txt_di,  adj = txtadj, xpd =
> TRUE, cex=txt_cex)
> 

Try: 

 …, labels=bquote( atop(.(LABELS) , n==.(name.count[,two]) ) ), …

(Unable to test with all those undefined parameters.)

?plotmath
# where one can read that "\n" is not honored by plotmath functions, including 
paste().
?bquote

-- 
David

> where LABELS=Devonian volcanic rocks
> and name.count[,two] =2
> 

David Winsemius
Alameda, CA, USA

______________________________________________
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