It a trivial point but can anyone tell me why gcolor is not working here? I thought that I should be getting the letters in red. lcolor seems to work just fine. aa <- c(3,6,3,5,8) lbs <- LETTERS[1:5] dotchart(rev(aa), pch=16, labels=(rev(lbs)), lcolor="blue", gcolor="red") Looking for the perfect gift? Give the gift of Flickr!
You only have one group. Try it with two groups: dotchart(cbind(a = aa, b = aa), gcolor = "red") On Jan 19, 2008 2:48 PM, John Kane <jrkrideau at yahoo.ca> wrote:> It a trivial point but can anyone tell me why gcolor > is not working here? I thought that I should be > getting the letters in red. lcolor seems to work just > fine. > > aa <- c(3,6,3,5,8) > lbs <- LETTERS[1:5] > > dotchart(rev(aa), pch=16, labels=(rev(lbs)), > lcolor="blue", gcolor="red") > > > > > Looking for the perfect gift? Give the gift of Flickr! > > ______________________________________________ > 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. >
Or even one group if its named: dotchart(cbind(a = aa), gcolor = "red") On Jan 19, 2008 3:18 PM, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:> You only have one group. Try it with two groups: > > dotchart(cbind(a = aa, b = aa), gcolor = "red") > > > > On Jan 19, 2008 2:48 PM, John Kane <jrkrideau at yahoo.ca> wrote: > > It a trivial point but can anyone tell me why gcolor > > is not working here? I thought that I should be > > getting the letters in red. lcolor seems to work just > > fine. > > > > aa <- c(3,6,3,5,8) > > lbs <- LETTERS[1:5] > > > > dotchart(rev(aa), pch=16, labels=(rev(lbs)), > > lcolor="blue", gcolor="red") > > > > > > > > > > Looking for the perfect gift? Give the gift of Flickr! > > > > ______________________________________________ > > 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. > > >
Thank you Gabor. The examples are excellent. I was misreading the intend of gcolor. I had thought that it would allow me to colour all of the value labels . --- Gabor Grothendieck <ggrothendieck at gmail.com> wrote:> Or even one group if its named: > > dotchart(cbind(a = aa), gcolor = "red") > > On Jan 19, 2008 3:18 PM, Gabor Grothendieck > <ggrothendieck at gmail.com> wrote: > > You only have one group. Try it with two groups: > > > > dotchart(cbind(a = aa, b = aa), gcolor = "red") > > > > > > > > On Jan 19, 2008 2:48 PM, John Kane > <jrkrideau at yahoo.ca> wrote: > > > It a trivial point but can anyone tell me why > gcolor > > > is not working here? I thought that I should be > > > getting the letters in red. lcolor seems to > work just > > > fine. > > > > > > aa <- c(3,6,3,5,8) > > > lbs <- LETTERS[1:5] > > > > > > dotchart(rev(aa), pch=16, labels=(rev(lbs)), > > > lcolor="blue", gcolor="red") > > > > > > > > > > > > > > > Looking for the perfect gift? Give the gift > of Flickr! > > > > > > ______________________________________________ > > > 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. > > > > > >Looking for the perfect gift? Give the gift of Flickr!
Use col= for that. On Jan 19, 2008 4:31 PM, John Kane <jrkrideau at yahoo.ca> wrote:> Thank you Gabor. The examples are excellent. > > I was misreading the intend of gcolor. I had thought > that it would allow me to colour all of the value > labels . > > > --- Gabor Grothendieck <ggrothendieck at gmail.com> > > wrote: > > > Or even one group if its named: > > > > dotchart(cbind(a = aa), gcolor = "red") > > > > On Jan 19, 2008 3:18 PM, Gabor Grothendieck > > <ggrothendieck at gmail.com> wrote: > > > You only have one group. Try it with two groups: > > > > > > dotchart(cbind(a = aa, b = aa), gcolor = "red") > > > > > > > > > > > > On Jan 19, 2008 2:48 PM, John Kane > > <jrkrideau at yahoo.ca> wrote: > > > > It a trivial point but can anyone tell me why > > gcolor > > > > is not working here? I thought that I should be > > > > getting the letters in red. lcolor seems to > > work just > > > > fine. > > > > > > > > aa <- c(3,6,3,5,8) > > > > lbs <- LETTERS[1:5] > > > > > > > > dotchart(rev(aa), pch=16, labels=(rev(lbs)), > > > > lcolor="blue", gcolor="red") > > > > > > > > > > > > > > > > > > > > Looking for the perfect gift? Give the gift > > of Flickr! > > > > > > > > ______________________________________________ > > > > 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. > > > > > > > > > > > > > Looking for the perfect gift? Give the gift of Flickr! > > http://www.flickr.com/gift/ > >
--- Gabor Grothendieck <ggrothendieck at gmail.com> wrote:> Use col= for that.Well yes, but I was trying to get the points on the graph coloured and the value labels uncoloured (that is black). Thanks> > On Jan 19, 2008 4:31 PM, John Kane > <jrkrideau at yahoo.ca> wrote: > > Thank you Gabor. The examples are excellent. > > > > I was misreading the intend of gcolor. I had > thought > > that it would allow me to colour all of the value > > labels . > > > > > > --- Gabor Grothendieck <ggrothendieck at gmail.com> > > > > wrote: > > > > > Or even one group if its named: > > > > > > dotchart(cbind(a = aa), gcolor = "red") > > > > > > On Jan 19, 2008 3:18 PM, Gabor Grothendieck > > > <ggrothendieck at gmail.com> wrote: > > > > You only have one group. Try it with two > groups: > > > > > > > > dotchart(cbind(a = aa, b = aa), gcolor > "red") > > > > > > > > > > > > > > > > On Jan 19, 2008 2:48 PM, John Kane > > > <jrkrideau at yahoo.ca> wrote: > > > > > It a trivial point but can anyone tell me > why > > > gcolor > > > > > is not working here? I thought that I should > be > > > > > getting the letters in red. lcolor seems to > > > work just > > > > > fine. > > > > > > > > > > aa <- c(3,6,3,5,8) > > > > > lbs <- LETTERS[1:5] > > > > > > > > > > dotchart(rev(aa), pch=16, labels=(rev(lbs)), > > > > > lcolor="blue", gcolor="red") > > > > > > > > > > > > > > > > > > > > > > > > > Looking for the perfect gift? Give the > gift > > > of Flickr! > > > > > > > > > > > ______________________________________________ > > > > > 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. > > > > > > > > > > > > > > > > > > > > Looking for the perfect gift? Give the gift > of Flickr! > > > > http://www.flickr.com/gift/ > > > > >Looking for the perfect gift? Give the gift of Flickr!
Try this: aa <- c(a = 1, b = 2, c = 3) dotchart(unname(aa), col = 1:3) axis(side = 2, seq_along(aa), names(aa)) On Jan 19, 2008 5:01 PM, John Kane <jrkrideau at yahoo.ca> wrote:> > --- Gabor Grothendieck <ggrothendieck at gmail.com> > wrote: > > > Use col= for that. > > Well yes, but I was trying to get the points on the > graph coloured and the value labels uncoloured (that > is black). > > Thanks > > > > > > > > On Jan 19, 2008 4:31 PM, John Kane > > <jrkrideau at yahoo.ca> wrote: > > > Thank you Gabor. The examples are excellent. > > > > > > I was misreading the intend of gcolor. I had > > thought > > > that it would allow me to colour all of the value > > > labels . > > > > > > > > > --- Gabor Grothendieck <ggrothendieck at gmail.com> > > > > > > wrote: > > > > > > > Or even one group if its named: > > > > > > > > dotchart(cbind(a = aa), gcolor = "red") > > > > > > > > On Jan 19, 2008 3:18 PM, Gabor Grothendieck > > > > <ggrothendieck at gmail.com> wrote: > > > > > You only have one group. Try it with two > > groups: > > > > > > > > > > dotchart(cbind(a = aa, b = aa), gcolor > > "red") > > > > > > > > > > > > > > > > > > > > On Jan 19, 2008 2:48 PM, John Kane > > > > <jrkrideau at yahoo.ca> wrote: > > > > > > It a trivial point but can anyone tell me > > why > > > > gcolor > > > > > > is not working here? I thought that I should > > be > > > > > > getting the letters in red. lcolor seems to > > > > work just > > > > > > fine. > > > > > > > > > > > > aa <- c(3,6,3,5,8) > > > > > > lbs <- LETTERS[1:5] > > > > > > > > > > > > dotchart(rev(aa), pch=16, labels=(rev(lbs)), > > > > > > lcolor="blue", gcolor="red") > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Looking for the perfect gift? Give the > > gift > > > > of Flickr! > > > > > > > > > > > > > > ______________________________________________ > > > > > > 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. > > > > > > > > > > > > > > > > > > > > > > > > > > > Looking for the perfect gift? Give the gift > > of Flickr! > > > > > > http://www.flickr.com/gift/ > > > > > > > > > > > > Looking for the perfect gift? Give the gift of Flickr! > > http://www.flickr.com/gift/ > >
Excellent, it does exactly what I wanted.. I had never encountered "unname" before. Thanks very much. --- Gabor Grothendieck <ggrothendieck at gmail.com> wrote:> Try this: > > aa <- c(a = 1, b = 2, c = 3) > dotchart(unname(aa), col = 1:3) > axis(side = 2, seq_along(aa), names(aa)) > > > > On Jan 19, 2008 5:01 PM, John Kane > <jrkrideau at yahoo.ca> wrote: > > > > --- Gabor Grothendieck <ggrothendieck at gmail.com> > > wrote: > > > > > Use col= for that. > > > > Well yes, but I was trying to get the points on > the > > graph coloured and the value labels uncoloured > (that > > is black). > > > > Thanks > > > > > > > > > > > > > > On Jan 19, 2008 4:31 PM, John Kane > > > <jrkrideau at yahoo.ca> wrote: > > > > Thank you Gabor. The examples are excellent. > > > > > > > > I was misreading the intend of gcolor. I had > > > thought > > > > that it would allow me to colour all of the > value > > > > labels . > > > > > > > > > > > > --- Gabor Grothendieck > <ggrothendieck at gmail.com> > > > > > > > > wrote: > > > > > > > > > Or even one group if its named: > > > > > > > > > > dotchart(cbind(a = aa), gcolor = "red") > > > > > > > > > > On Jan 19, 2008 3:18 PM, Gabor Grothendieck > > > > > <ggrothendieck at gmail.com> wrote: > > > > > > You only have one group. Try it with two > > > groups: > > > > > > > > > > > > dotchart(cbind(a = aa, b = aa), gcolor > > > "red") > > > > > > > > > > > > > > > > > > > > > > > > On Jan 19, 2008 2:48 PM, John Kane > > > > > <jrkrideau at yahoo.ca> wrote: > > > > > > > It a trivial point but can anyone tell > me > > > why > > > > > gcolor > > > > > > > is not working here? I thought that I > should > > > be > > > > > > > getting the letters in red. lcolor > seems to > > > > > work just > > > > > > > fine. > > > > > > > > > > > > > > aa <- c(3,6,3,5,8) > > > > > > > lbs <- LETTERS[1:5] > > > > > > > > > > > > > > dotchart(rev(aa), pch=16, > labels=(rev(lbs)), > > > > > > > lcolor="blue", gcolor="red") > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Looking for the perfect gift? Give > the > > > gift > > > > > of Flickr! > > > > > > > > > > > > > > > > > ______________________________________________ > > > > > > > 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. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Looking for the perfect gift? Give the > gift > > > of Flickr! > > > > > > > > http://www.flickr.com/gift/ > > > > > > > > > > > > > > > > > > > Looking for the perfect gift? Give the gift > of Flickr! > > > > http://www.flickr.com/gift/ > > > > >Looking for the perfect gift? Give the gift of Flickr!