[R] two histograms in the same graph

Jim Lemon jim at bitwrit.com.au
Fri Jan 25 10:14:32 CET 2008


Juan Pablo Fededa wrote:
> Dear Contributors:
> 
> I have two vectors x and z, and I want to display the histograms of both
> vectors in the same graph, x in red bars, z in blue bars.
> If you have any clue on how to do that, I will be very glad to hear it!!!!!!
> Thanks in advance again,
> 
Hi Juan,
The "multhist" function in the plotrix package can do this, although you 
might also want to look at "barp".

Jim



More information about the R-help mailing list