s-news
[Top] [All Lists]

different colors for bars in barplot, the solution

To: s-news@wubios.wustl.edu
Subject: different colors for bars in barplot, the solution
From: Jeff Simonoff <jsimonof@stern.nyu.edu>
Date: Thu, 20 May 2004 11:56:50 -0400 (EDT)
Hi again,
Tony Plate has provided the solution to my problem. He discovered that the
col= argument can be given as a matrix, in which case barplot() uses
different (specified) colors for both rows and columns if height is input
as a matrix. It turns out that the density= and angle= arguments also can
be set this way. This is a very nice feature, so it's a shame that the 
documentation (which states that these arguments are vectors) is incorrect
(or at least incomplete).

           Best,

           Jeff


==============================================================================
Jeffrey S. Simonoff                            Phone:  (212) 998-0452
Professor of Statistics
Leonard N. Stern School of Business            Fax:    (212) 995-4003
New York University
44 West 4th Street, Rm. 8-54                   e-mail: jsimonof@stern.nyu.edu
New York, NY 10012-0258
USA                                    WWW: http://www.stern.nyu.edu/~jsimonof
==============================================================================



<Prev in Thread] Current Thread [Next in Thread>
  • different colors for bars in barplot, the solution, Jeff Simonoff <=