Re: [R] Plot label axis with expression

2012-08-22 Thread David Winsemius
On Aug 22, 2012, at 2:46 PM, Noia Raindrops wrote: Hello, Use 'parse' for converting from character to expression: x <- c(100, 50, 10, 1, 0.1, 0.05, 0.001) plot(log(x), yaxt = "n") parse(text = sprintf("e^%d", axTicks(2))) ## expression(e^-6, e^-4, e^-2, e^0, e^2, e^4) axis(2, at = axTicks(

Re: [R] Plot label axis with expression

2012-08-22 Thread Noia Raindrops
Hello, Use 'parse' for converting from character to expression: x <- c(100, 50, 10, 1, 0.1, 0.05, 0.001) plot(log(x), yaxt = "n") parse(text = sprintf("e^%d", axTicks(2))) ## expression(e^-6, e^-4, e^-2, e^0, e^2, e^4) axis(2, at = axTicks(2), labels = parse(text = sprintf("e^%d", axTicks(2))),

[R] Plot label axis with expression

2012-08-22 Thread mariojose
Hi all, I need help with axis in plot. I want to edit y axis label of my plot. My data is like: x <- c(100,50,10,1,0.1,0.05,0.001) plot(log(x)) axTicks(2) # Label of y axis [1] -6 -4 -2 0 2 4 I'd like that y axis label was like: e^-6, e^-4, etc. (with text "e" superscript -6, -4, etc.) I t