Hi,
I have a barplot with 3 groups of 4 bars :
> barplot(ww,beside=T,ylab="Effectif (%)")
where
> ww
BB BBD BBTM
0 0.2757158 0.701565 0.8334865
1 6.6929253 30.936319 6.9957713
2 40.3272231 34.201295 42.0297849
3 52.7041357 34.160820 50.1409573
I would like to have one color per group, something like:
> rep(1:3, rep(4, 3))
[1] 1 1 1 1 2 2 2 2 3 3 3 3
but the option col=rep(1:3, rep(4, 3)) makes all the bars black.
Thank you,
Tristan Lorino
--
Laboratoire Central des Ponts et Chaussées
[Division ESAR ? Section AGR]
Route de Bouaye BP 4129
44341 Bouguenais Cedex
France
Tél 33 (0)2 40 84 56 18
Fax 33 (0)2 40 84 59 92
|