You are kind

2011/9/14 Sarah Goslee <sarah.gos...@gmail.com>

> Hi,
>
> > The probleme is that when I use points function; it plots to me lines and
> > not simpe points.
>
> That seems unlikely, but without your code it's hard to figure out
> what you did. As usual, the telepathy is not working.
>
> Regardless, this will create a graph with points:
>
> x <- read.table("clipboard", header=FALSE, as.is=TRUE)
> # including data is good; including data with dput() is better
>
> plot(x[,2], x[,3], type="p", xlab="X", ylab="Y", main="Points")
>
> > I read it with R and next I want to draw a point for each line the X is
> in
> > col  2 and y is in col 3
> > but, I need that for each value of the first colomn , to have a color.
> Thus,
> > I want to get a draw with 3 colors for values 0 , 0.2 and 0.4
>
> And here's one way to color them:
> plot(x[,2], x[,3], col=c("red", "blue", "green")[as.factor(x[,1])],
> xlab="X", ylab="Y", main="Colored Points")
>
> You might be interested in ?par especially pch and also in ?legend
> as well as in the basic help for ?plot and ?points.
>
> Sarah
>
> On Wed, Sep 14, 2011 at 1:57 PM, Adel ESSAFI <adeless...@gmail.com> wrote:
> > Hello list
> > I have this file
> >
> > 0   121289479 25
> > 0   212599129 1
> > 0   285254098   21
> > 0   444889848   45
> > 0   469197123   30
> > 0   640007403   82
> > 0   718215617 8
> > 0   758534043   56
> > 0   799706577   4
> > 0   814441385   93
> > 0   843545059   37
> > 0.2   121289479   6
> > 0.2   285254098   3
> > 0.2   444889848   6
> > 0.2   469197123   13
> > 0.2   640007403   24
> > 0.2   718215617 3
> > 0.2   758534043   2
> > 0.2   799706577   2
> > 0.2   814441385   70
> > 0.2   843545059 3
> > 0.4   121289479   1
> > 0.4   444889848   14
> > 0.4   469197123   4
> > 0.4   640007403   11
> > 0.4   799706577   2
> > 0.4   814441385 8
> >
> >
> >
>
> >
> > Thank you in advance for any input.
> >
> >
> >
>
>
>
> --
> Sarah Goslee
> http://www.functionaldiversity.org
>



-- 
PhD candidate in Computer Science
Address
3 avenue lamine, cité ezzahra, Sousse 4000
Tunisia
tel: +216 97 246 706 (+33640302046 jusqu'au 15/6)
fax: +216 71 391 166

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to