Re: [R] assigning colors to barplot

From: Jim Lemon <>
Date: Fri, 27 Jun 2008 22:41:06 +1000

On Fri, 2008-06-27 at 15:17 +0530, Archana Vagish wrote:
> Hi,
> I want to plot a series of numbers ( which lie in the range 1-20, there are
> many such numbers) as a barplot. However instead of representing the values
> in terms of height, i want to assign one unique color to each number. How
> can this be done in R?

Hi Archana,
Have a look at the color.scale function in the plotrix package to may your values into colors.

Jim mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 27 Jun 2008 - 12:49:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 Jun 2008 - 13:31:37 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive