Re: [R] plot function creating bars instead of lines

2012-04-24 Thread Jim Lemon
On 04/24/2012 01:25 AM, la mer wrote: Hello, I am having a problem where code that plots lines using a different data frame plots bars with the current data frame (I am intended to plot lines). The code specifies lines (see below), so I can't figure out why the results are bars. I suspect that i

Re: [R] plot function creating bars instead of lines

2012-04-23 Thread R. Michael Weylandt
It is indeed the fact you're plotting factors, but unless you say what "as intended" is, it's hard to provide exactly what you're seeking. Perhaps this will help though: X <- factor(sample(letters[1:5], 15, TRUE)) Y <- rnorm(15) dats <- data.frame(X, Y) plot(Y ~ X, data = dats) # No good plot(X