Skip to content
Back to formatted view

Raw Message

Message-ID: <CAAxdm-6WEKFrd0ejS+s5OX9pzQosxQxe=wFt=wqa5Z5dKGQcbQ@mail.gmail.com>
Date: 2012-05-11T17:59:06Z
From: jim holtman
Subject: text(): combine expression and line break
In-Reply-To: <026C9FF6-4EE3-4F41-95FE-E5455FE4C150@gmx.at>

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.