Judith Flores wrote:
> Sorry, I just realized I didn't type in the correct
> names of the variables I am working with, this is how
> it should be:
>
> plot(1,1,type="n")
> for (i in summ$tx) {
>
>points(summ$timep[summ$tx==i],summ$mn[summ$tx==i])
>lines(summ$timep[summ$tx==i],summ$mn[summ
It's hard to provide a useful answer without know what your data looks
like, but maybe something like:
library(ggplot2)
qplot(timep, mn, data=summ, geom="line", colour = tx)
Hadley
On Tue, Feb 26, 2008 at 4:24 PM, Judith Flores <[EMAIL PROTECTED]> wrote:
> Sorry, I just realized I didn't type in
Sorry, I just realized I didn't type in the correct
names of the variables I am working with, this is how
it should be:
plot(1,1,type="n")
for (i in summ$tx) {
points(summ$timep[summ$tx==i],summ$mn[summ$tx==i])
lines(summ$timep[summ$tx==i],summ$mn[summ$tx==i])
}
Thank you,
Judith
I am not sure if I completely understand but would
something like this work? (not tested)
points( col=i)
lines ( col=i=1)
--- Judith Flores <[EMAIL PROTECTED]> wrote:
> Dear R-experts,
>
>I want to assign different colors to groups of
> points, lines and segments in a plot.
>
> I
Dear R-experts,
I want to assign different colors to groups of
points, lines and segments in a plot.
I have a vector(dat$tx) that is going to have a
different number of levels every time the user wants
to plot a set of data. The number of lines is going to
be equal to the number of levels of
5 matches
Mail list logo