[BioC] Problem with coloring histograms

J.delasHeras at ed.ac.uk J.delasHeras at ed.ac.uk
Fri Jul 28 11:43:44 CEST 2006


Hi,

I am using 'hist' to make a frequency histogram from my 
background-substracted foreground values. I want to highlight the first 
bar in the histogram. That's easily accomplished... unless the first 
bar is of negative values, then teh bar can't get coloured. It's either 
all coloured or nothing.

what I do is something like this:

hist(RG.s$R,col=c("darkblue",rep("white",14)))

this one contains only positive values, and paints the first bar blue, 
and teh rest white.

but if the RG.s$R vector contains some negative values, then the bar at 
the left of the 0 (negative counts) doesn't get coloured.

However, if I do:

hist(RG.s$R,col="darkblue")

it paints all of them blue... so teh first bar can be painted

so... anybody knows how can I get around this?

Jose

-- 
Dr. Jose I. de las Heras                      Email: J.delasHeras at ed.ac.uk
The Wellcome Trust Centre for Cell Biology    Phone: +44 (0)131 6513374
Institute for Cell & Molecular Biology        Fax:   +44 (0)131 6507360
Swann Building, Mayfield Road
University of Edinburgh
Edinburgh EH9 3JR
UK



More information about the Bioconductor mailing list