sir i done this plot(1:33292, 1:33292,col=Color(33292)) command then it gives the coloured line but again it is not working in my data why? -- View this message in context: http://r.789695.n4.nabble.com/Colour-gradient-is-not-working-tp4708000p4708036.html Sent from the R help mailing list archive at Nabble.com.
> plot(1:33292, 1:33292,col=Color(33292))Error in plot.xy(xy, type, ...) : could not find function "Color" Please tell us what you're trying to accomplish. "not working" is rather vague. Without a reproducible example that includes some sample data (fake is fine), the code you used, and some clear idea of what output you expect, it's impossible to figure out how to help you. Here are some suggestions for creating a good reproducible example: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Sarah On Tue, Jun 2, 2015 at 4:39 AM, sreenath <sreenath.rajur at macfast.ac.in> wrote:> sir i done this plot(1:33292, 1:33292,col=Color(33292)) command then it gives > the coloured line but again it is not working in my data why? > > >-- Sarah Goslee http://www.functionaldiversity.org
Points later in the input vectors may be obscuring earlier points. If that is the problem then use pch="." or cex=.2 (or some other small number) to make the plot symbols smaller so they don't overlap as much. Sometimes using transparency helps also - try using adjustcolor(Color(n), alpha.f=0.5) instead of Color(n). Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Jun 2, 2015 at 1:39 AM, sreenath <sreenath.rajur at macfast.ac.in> wrote:> sir i done this plot(1:33292, 1:33292,col=Color(33292)) command then it > gives > the coloured line but again it is not working in my data why? > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Colour-gradient-is-not-working-tp4708000p4708036.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >[[alternative HTML version deleted]]
Another trick if Bill is correct is to sort the data first, by whatever variable the color is intended to represent. -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 6/2/15, 9:06 AM, "William Dunlap" <wdunlap at tibco.com> wrote:>Points later in the input vectors may be obscuring earlier >points. If that is the problem then use pch="." or cex=.2 >(or some other small number) to make the plot symbols >smaller so they don't overlap as much. Sometimes using >transparency helps also - try using adjustcolor(Color(n), alpha.f=0.5) >instead of Color(n). > > >Bill Dunlap >TIBCO Software >wdunlap tibco.com > >On Tue, Jun 2, 2015 at 1:39 AM, sreenath <sreenath.rajur at macfast.ac.in> >wrote: > >> sir i done this plot(1:33292, 1:33292,col=Color(33292)) command then it >> gives >> the coloured line but again it is not working in my data why? >> >> >> >> -- >> View this message in context: >> >>http://r.789695.n4.nabble.com/Colour-gradient-is-not-working-tp4708000p47 >>08036.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. >> > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >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.