Re: [R] A question about using function plot

2008-07-14 Thread Richard M. Heiberger
Your x values look to be multiples of two, therefore you might be interested in using log values for the x axis. x = c(1,2,4,8) y = c(1,2,3,4) plot(x, y, log="x", xaxt='n') axis(1, at=x, labels=x) __ R-help@r-project.org mailing list https://stat.ethz

Re: [R] A question about using function plot

2008-07-14 Thread Robert Baer
How about: plot.default(factor(x), y, xaxt='n', xlab='x') axis(1, at=factor(x), labels=x) - Original Message - From: "Jason Liao" <[EMAIL PROTECTED]> To: Sent: Monday, July 14, 2008 10:00 AM Subject: [R] A question about using function plot

Re: [R] A question about using function plot

2008-07-14 Thread Sarah Goslee
What about making x a factor? Sarah On Mon, Jul 14, 2008 at 11:00 AM, Jason Liao <[EMAIL PROTECTED]> wrote: > Hello, everyone! I have spent two hours to get what I wanted in a simple > situation and have not been successful. The set up is extremely simple > > x = c(1,2,4,8) > y = c(1,2,3,4) > pl

Re: [R] A question about using function plot

2008-07-14 Thread Chuck Cleland
On 7/14/2008 11:00 AM, Jason Liao wrote: Hello, everyone! I have spent two hours to get what I wanted in a simple situation and have not been successful. The set up is extremely simple x = c(1,2,4,8) y = c(1,2,3,4) plot(x, y) What I need, however, is for the 4 points of 1,2,4,8 to be spaced ev

Re: [R] A question about using function plot

2008-07-14 Thread Henrique Dallazuanna
Try: library(lattice) xyplot(y ~ factor(x)) or plot(1:length(x), y, xaxt='n') axis(1, at=1:length(x), labels=x) On Mon, Jul 14, 2008 at 12:00 PM, Jason Liao <[EMAIL PROTECTED]> wrote: > Hello, everyone! I have spent two hours to get what I wanted in a simple > situation and have not been suc

[R] A question about using function plot

2008-07-14 Thread Jason Liao
Hello, everyone! I have spent two hours to get what I wanted in a simple situation and have not been successful. The set up is extremely simple x = c(1,2,4,8) y = c(1,2,3,4) plot(x, y) What I need, however, is for the 4 points of 1,2,4,8 to be spaced evenly, not by their numerical scale. Also,