Not reading the documentation for color specification? Integers do not specify offsets in the colors() table.
?par If you do want offsets into the colors table, perhaps you should do just that? ..., col=colors()[ c( 552, 254, 26 )], ... --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. Katharine Miller - NOAA Federal <katharine.mil...@noaa.gov> wrote: >Hello, > >I am having difficulty obtaining the correct colors in my R charts. > >> colors()[c(552, 254, 26)] >[1] "red" "green" "blue" > >But, if I specify col=552 in my barplot, I get gray bars. Likewise, >col=254 gives bright pink, and col=26 is a red-orange. I get accurate >results when I spell out the names, but I am making a pallet with 20- >30 >colors and it is a real pain to have to do that. Can anyone help me >figure >out what I am doing wrong? > >Thanks > > [[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. ______________________________________________ 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.