Skip to content
Back to formatted view

Raw Message

Message-ID: <47784A9D.70101@slamb.org>
Date: 2007-12-31T01:49:17Z
From: Scott Lamb
Subject: plot multiple data sets on same axis
In-Reply-To: <47784544.90709@slamb.org>

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 looks like I need to
> supply a list of the x values as the "at" parameter, and I don't know
> how to get unique values from this_method$inactive. (I tried the clunky
> labels(split(this_method, this_method$inactive)), but it returns them as
> strings.)

Ahh. I missed the obvious answer - there's a function called unique.
at=unique(this_method$inactive) works.

> 
> * it redraws the graph's frame, and it ignores bty="l" when doing so.

also the x axis tics and labels...they're totally unreadable now.

Cheers,
Scott

-- 
Scott Lamb <http://www.slamb.org/>