[R] Stacked barplot: specifying individual bar hue/luminance

chaski01 nathaniel.pearson at gmail.com
Tue Nov 3 18:09:39 CET 2009


Hi all,

I'm trying to generate barplots from simple but long (~100000-row) data
files, in which each bar will comprise two stacked 'sub-bars'.  All the
upper sub-bars will have the same hue, and all the lower bars will,
likewise, have another uniform hue.  However, I wish to specify the
luminance (aka brightness) of each bar (i.e., each whole bar comprising two
sub-bars) separately, and I wish the plot to render without spaces between
successive bars. 

I've been trying to get this going in ggplot2.  Two problems arise: first,
I'm unable to eliminate the spaces between successive bars.  And second (and
more importantly), while I can vary transparency (i.e., alpha) of bars
singly, I'm not sophisticated enough with the grammar to know how to define
a color palette that lets me vary the luminance singly.  Can anyone suggest
how to do this, either in ggplot or in basic R (or some other package)?

Many thanks,

Nathan Pearson
nathaniel.pearson at gmail.com
-- 
View this message in context: http://old.nabble.com/Stacked-barplot%3A-specifying-individual-bar-hue-luminance-tp26160543p26160543.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list