Skip to content
Back to formatted view

Raw Message

Message-ID: <4263C8CA.5070301@statistik.uni-dortmund.de>
Date: 2005-04-18T14:48:42Z
From: Uwe Ligges
Subject: Barplot and colors for legend
In-Reply-To: <20050418143706.46041.qmail@web25805.mail.ukl.yahoo.com>

Werner Wernersen wrote:

> Hi all!
> 
> One quick question: How do I get the standard colors
> used by barplot? I have 
> some stacked bars and would like to add a horizontal
> legend via legend() but I 
> don't know how to find the colors for the fills of the
> legend points.
> 
> Thanks!
>    Werner


Type
   barplot.default
and read the code:

for a vector: "grey",
for a matrix: grey(seq(0.3^2.2, 0.9^2.2, length = nrow(height))^(1/2.2))


Uwe Ligges