Re: [R] help on plot on the log scale but showing original values on axis

2012-08-30 Thread Michael Weylandt
Possibly easier: plot(x, y, log = "x") Cheers, Michael On Aug 30, 2012, at 5:47 AM, Rui Barradas wrote: > Hello, > > The following is the general idea. > > x <-c(0.25,0.5,1,2,4,8,16,32) > y <-c(1,1,1,1,0.9,0.8,0.6,0.2) > > plot(log(x),y,type="b", xaxt = "n") > axis(1, at = log(x), labels = x

Re: [R] help on plot on the log scale but showing original values on axis

2012-08-30 Thread Rui Barradas
Hello, The following is the general idea. x <-c(0.25,0.5,1,2,4,8,16,32) y <-c(1,1,1,1,0.9,0.8,0.6,0.2) plot(log(x),y,type="b", xaxt = "n") axis(1, at = log(x), labels = x) If the x values are not so "neat", you can adjust the axis ticks and labels using round/seq. Hope this helps, Rui Barrad

[R] help on plot on the log scale but showing original values on axis

2012-08-30 Thread Andras Farkas
dear All   I am trying to plot the following with the x axis on the log scale, but I would like the original x values to show up as labels:   x <-c(0.25,0.5,1,2,4,8,16,32) y <-c(1,1,1,1,0.9,0.8,0.6,0.2)   plot(log(x),y,type="b")   here I would like the labels 0.25,0.5,1,2,4,8,16, and 32 to show on