[R] can't see colors with "col" in boxplot()

David Winsemius dwinsemius at comcast.net
Thu Oct 4 04:24:43 CEST 2012


On Oct 3, 2012, at 1:58 PM, Mark B wrote:

> Hi,
> I am trying to color the data points on my boxplot but I only get the
> default black.

You mean the outlier points?

> Not sure why.  Any ideas?

Look at:

? bxp

... and try ,,,  outcol="red"


> Thank you,
> Mark
> 
> Here is my code.
> 
> 
> 
>> dat.g100 <- dat.sg[100,] # selected gene (row) from a dataframe of
> 37 columns
> 
>> d1 <- as.matrix(dat.g100[,1:18]) # subset 1
> 
>> d2 <- as.matrix(dat.g100[,19:37]) # subset 2
> 
> 
> 
> # boxplots
> 
>> par(mfrow=c(2,1))
> 
>> boxplot(d1, cex=0.3, col="red",
> las=2,cex.axis=0.6,ylab="intensity",main="B cells: germinal center ˆ gene
> 100")
> 
>> boxplot(d2, cex=0.3, col="blue",
> las=2,cex.axis=0.6,ylab="intensity",main="B cells: activated ˆ gene 100")
> 
> 	[[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.

David Winsemius, MD
Alameda, CA, USA




More information about the R-help mailing list