[R] hist or barplot
Jacques VESLOT
jacques.veslot at good.ibl.fr
Thu Jul 20 10:03:39 CEST 2006
> s1 <- runif(10,0,10)
> s1
[1] 8.328396 2.840870 7.401377 9.998165 5.045539 9.568728 5.372493 5.232439
[9] 5.774790 4.224103
> s2 <- runif(10,0,10)
> s2
[1] 1.230750 3.855060 8.652698 7.846725 9.100171 7.309179 9.235562 1.581741
[9] 6.979521 1.918997
> ss <- cbind(s1,s2)
> smin <- apply(ss,1,min)
> smax <- apply(ss,1,max)
> barplot(smax)
> barplot(smin, add=T, col="white")
-------------------------------------------------------------------
Jacques VESLOT
CNRS UMR 8090
I.B.L (2ème étage)
1 rue du Professeur Calmette
B.P. 245
59019 Lille Cedex
Tel : 33 (0)3.20.87.10.44
Fax : 33 (0)3.20.87.10.31
http://www-good.ibl.fr
-------------------------------------------------------------------
COMTE Guillaume a écrit :
>
>
> Hi all,
>
>
>
> I wish to draw 2 hist (or barplot) on the same graph.
>
>
>
> I can do it simply by using par(new=TRUE) , but it overlap with the
> first drawn, how to tell R to put in front of the graph the min value of
> the two graph in order for it to be seen and don't hide each other.
>
>
>
> I've been looking at help for barplot or hist but didn't find
> anything... (or my english is too poor to understand)
>
>
>
> thks
>
> COMTE Guillaume
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
More information about the R-help
mailing list