[R] text(): combine expression and line break
jim holtman
jholtman at gmail.com
Fri May 11 19:59:06 CEST 2012
try this:
plot(1,type="n", xaxt='n', yaxt='n', ann=FALSE)
text(1,1,labels=expression(atop(sigma, "log scale,m")),cex = 2)
On Fri, May 11, 2012 at 1:40 PM, Johannes Radinger <jradinger at gmx.at> wrote:
> Hi,
>
> I would like to plot some extra text in my plot.
> This should be a two line text including a special character (sigma).
> I tried so far a to use expression in combination with paste and "\n"...
> but I can't get the line break...
>
> Here what I've done so far:
>
> plot(1,type="n", xaxt='n', yaxt='n', ann=FALSE)
> text(1,1,labels=expression(paste(sigma,"\n (log scale, m)")),cex = 2)
>
> Maybe someone knows how I can achieve that...
>
>
> cheers,
>
> /johannes
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
--
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
More information about the R-help
mailing list