[R] graph: horizontal bar reflecting number of data
Dagmar
Ramgad82 at gmx.net
Fri Jul 15 09:14:59 CEST 2016
Dear all, dear Jim,
Thank you for trying to help Jim. Unfortunately it didn't solve my problem.
I want the names of the weeks on the x axis and the animals on the y-axis.
Then, the shading of the barplot is supposed to represent the number of
data per week.
Any help?
Dagmar
Am 13.07.2016 um 13:58 schrieb Jim Lemon:
> datframe$numberdata<-as.numeric(as.character(datframe$numberdat))
> library(plotrix)
> barcol<-color.scale(datframe$numberdat,extremes=c("black","white"))
> barplot(matrix(datframe$numberdat,nrow=2,byrow=TRUE),
> beside=TRUE, horiz=TRUE,names.arg=paste("Week",1:3),
> col=matrix(barcol,nrow=2,byrow=TRUE))
More information about the R-help
mailing list