[R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Andrew Kniss
I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using /n to break it into two lines. However, to make it technically correct for publication, I also need to use superscript in the label. For

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using /n to break it into two lines. However, to make it technically correct for

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Gabor Grothendieck
Use atop: plot(1, main = expression(atop( ^14*C*-glyphosate line, line2))) On 8/4/06, Andrew Kniss [EMAIL PROTECTED] wrote: I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using /n to break it

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Gabor Grothendieck
Sorry, you wanted a ylab=, not a main=. Try using xyplot in lattice: library(lattice) xyplot(1~1, ylab = expression(atop(phantom(0)^14*C*-glyphosate line, line2))) On 8/4/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Use atop: plot(1, main = expression(atop( ^14*C*-glyphosate line,

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
Actually Gabor, using your solution with 'atop', which I had not considered, it will work with base graphics: par(oma = c(0, 0, 2, 0), mar = c(5, 6, 0.25, 2), lheight = 1) plot(1:10, ylab = expression(atop( ^14*C*-glyphosate line1, line2))) HTH, Marc On

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Prof Brian Ripley
On Fri, 4 Aug 2006, Marc Schwartz (via MN) wrote: On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using /n to break it into two lines.

Re: [R] expression() - Superscript in y-axis, keeping line break in string

2006-08-04 Thread Marc Schwartz (via MN)
On Fri, 2006-08-04 at 19:44 +0100, Prof Brian Ripley wrote: On Fri, 4 Aug 2006, Marc Schwartz (via MN) wrote: On Fri, 2006-08-04 at 09:47 -0600, Andrew Kniss wrote: I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long