Hello Daniel, something like that might work:
x <- runif(6) marker1 <- rep(c("red", "blue"), 3) marker2 <- c(rep(0,5), 10) barplot(x, col = marker1) barplot(x, density = marker2, add=T) But I'd be interested if you learn about other solutions... -Heinrich. > -----Ursprüngliche Nachricht----- > Von: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] Im Auftrag von Daniel Brewer > Gesendet: Donnerstag, 09. September 2010 16:03 > An: r-h...@stat.math.ethz.ch > Betreff: [R] Highlighting a few bars in a barplot > > > Hello, > > I have a bar plot where I am already using colour to > distinguish one set > of samples from another. I would also like to highlight a > few of these > bars as ones that should be looked at in detail. I was thinking of > using hatching, but I can't work out how or if you can have a > background > colour and hatching which is different between bars. Any > suggestions on > how I should do this? > > Thanks > > Dan > > -- > ************************************************************** > Daniel Brewer, Ph.D. > > Institute of Cancer Research > Molecular Carcinogenesis > Email: daniel.bre...@icr.ac.uk > ************************************************************** > > The Institute of Cancer Research: Royal Cancer Hospital, a > charitable Company Limited by Guarantee, Registered in > England under Company No. 534147 with its Registered Office > at 123 Old Brompton Road, London SW7 3RP. > > This e-mail message is confidential and for use by the > a...{{dropped:2}} > > ______________________________________________ > R-help@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. > ______________________________________________ R-help@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.