[R] in regards of plotting using functions.
Petr PIKAL
petr.pikal at precheza.cz
Mon Nov 29 14:03:32 CET 2010
Hi
PRAVIN <2pravinnilawe at gmail.com> napsal dne 29.11.2010 13:18:45:
> Thanks for your help & guidance.
>
> I am taking these values from a file as co-ordinates.
> I tried using the code for the same but it gave an error. saying "X
object error".
> plot((x=[,1],y=[,2]),
What is [,1]? You shall have some data from which you wanted to extract
first and second column.
What about to look into R-intro manual to chapter 2.
Regards
Petr
>
> so how should i embedded the expression within the plot?
>
> regards,
> Pravin
>
> On Mon, Nov 29, 2010 at 5:20 PM, Petr PIKAL <petr.pikal at precheza.cz>
wrote:
> Hi
>
> r-help-bounces at r-project.org napsal dne 29.11.2010 11:48:07:
>
> > Hello,
> >
> > I am using basic plotting technique to get a graph.
> > but i want to color the points plotted onto the graph depending upon
few
> > mathematical logics.
> > values > x should be colored blue.
> > values < y should be colored green.
> >
> Untested
>
> plot(a, b, pch=19, col=c("green", "blue)[ifelse(values>x, 2,
> ifelse(values<y, 1, NA))])
>
> Regards
> Petr
>
>
> > how can i go forward with the programming part in drawing these plots
> from
> > a single file.
> >
> > Please do let me know as soon as possible
> >
> > Regards,
> > --
> > Pravin Nilawe
> > Bioinformatics,
> > +91 9869739671
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at 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.
>
>
>
> --
> Pravin Nilawe
> Bioinformatics,
> +91 9869739671
More information about the R-help
mailing list