[R] bar plot colors

From: Winkel, David <WinkelD_at_battelle.org>
Date: Mon, 17 Dec 2007 16:03:14 -0500


I have a question regarding colors in bar plots. I want to stack a total of 18 cost values in each bar. Basically, it is six cost types and each cost type has three components- direct, indirect, and induced costs. I would like to use both solid color bars and bars with the slanted lines (using the density parameter). The colors would distinguish cost types and the lines would distinguish direct/indirect/induced. I want the cost types (i.e. colors) to be stacked together for each cost type. In other words, I don't want all of the solid bars at the bottom and all of the slanted lines at the top.

So far, I have made a bar plot with all solid colors and then tried to overwrite that bar plot by calling barplot() again and putting the white slanted lines across the bars. However, I can't get this method to work while still grouping the cost types together.  

Thanks in advance for any help you can provide.  

David Winkel

Applied Biology and Aerosol Technology

Battelle Memorial Institute

505 King Ave.

Columbus, Ohio 43201


        [[alternative HTML version deleted]]

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. Received on Mon 17 Dec 2007 - 21:05:24 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 Tue 18 Dec 2007 - 17:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.