Re: [R] How to control number of significant digits (figures) in y-axis?

2010-01-11 Thread willow1980
Dear Peter, Many thanks! Your code works perfectly. I hope this method will also be helpful to other users with similar problems. Best regards, Jianghua Peter Ehlers wrote: Use the 'scales=' argument together with formatC: x - 1:10 y - sample(10) xyplot(y ~ x, scales = list(

[R] How to control number of significant digits (figures) in y-axis?

2010-01-10 Thread willow1980
Dear R users, I encounter a problem regarding number of significant digits on y-axis. Below is my basic code: myplotkid-xyplot(expected_offspringnumber~afr|decade,groups=SES,data1, auto.key=list(space=right),layout=c(9,1),xlab=,ylab=Offspring number,

Re: [R] How to control number of significant digits (figures) in y-axis?

2010-01-10 Thread Peter Ehlers
Use the 'scales=' argument together with formatC: x - 1:10 y - sample(10) xyplot(y ~ x, scales = list( y = list( at = 1:10, lab = formatC(1:10, format = f, digits = 1 ?formatC ?xyplot -Peter Ehlers willow1980 wrote: Dear R