Scott Lamb wrote:
> Scott Lamb wrote:
>> I've tried replacing the for loop body with this:
>>
>> this_method <- split.df[[i]]
>> boxplot(elapsed~inactive, data=this_method,
>> add=TRUE, border=i, boxfill=i, outline=FALSE)
>>
>> but it has two problems:
>>
>> * it doesn't plot at
Scott Lamb wrote:
> I've tried replacing the for loop body with this:
>
> this_method <- split.df[[i]]
> boxplot(elapsed~inactive, data=this_method,
> add=TRUE, border=i, boxfill=i, outline=FALSE)
>
> but it has two problems:
>
> * it doesn't plot at the correct x values. It
Thank you - that was exactly what I needed. I just discovered read.csv
understands URLs, so here it is with my actual data and formatting:
df <- read.csv("http://www.slamb.org/tmp/one-active.csv";)
split.df <- split(df, df$method)
plot(0, xlim=range(df$inactive), ylim=range(df$elapsed)
Here is one way of doing it by splitting the data and plotting each
set in a different color:
# generate some test data
mydf <- data.frame(x=runif(200), y=rnorm(200),
dataset=sample(LETTERS[1:4], 200, TRUE))
# setup the plot are for the maximum of the data
plot(0, xlim=range(mydf$x), ylim=range(my
I'm new to R and struggling to reproduce graphs I've made with gnuplot.
Example here:
http://www.slamb.org/tmp/one-active.png
I have three different data sets plotted on the same axis. (I also have
a number of samples for each X value which I displayed with quartiles
rather than plotting ever
5 matches
Mail list logo