Re: [R] how to plot two histograms overlapped in the same plane coordinate

2010-07-10 Thread Jim Lemon
On 07/09/2010 11:29 PM, Mao Jianfeng wrote: Dear R-help listers, I am new. I just want to get helps on how to plot two histograms overlapped in the same plane coordinate. What I did is very ugly. Could you please help me to improve it? I want to got a plot with semi- transparent overlapping regi

Re: [R] how to plot two histograms overlapped in the same plane coordinate

2010-07-09 Thread Barry Rowlingson
On Fri, Jul 9, 2010 at 2:29 PM, Mao Jianfeng wrote: > Dear R-help listers, > > I am new. I just want to get helps on how to plot two histograms > overlapped in the same plane coordinate. What I did is very ugly. > Could you please help me to improve it? I want to got a plot with semi- > transparen

Re: [R] how to plot two histograms overlapped in the same plane coordinate

2010-07-09 Thread Frank E Harrell Jr
Empirical CDFs are much better for this purpose, and allow superpositioning (see e.g. the Ecdf function in the Hmisc package). Otherwise look at histbackback in Hmisc. Frank On 07/09/2010 11:40 AM, Andrew Miles wrote: I'm not sure what you are trying to do. Do you want one histogram for mal

Re: [R] how to plot two histograms overlapped in the same plane coordinate

2010-07-09 Thread Andrew Miles
I'm not sure what you are trying to do. Do you want one histogram for males and one for females on the same graph? If so, the simplest way to put two histograms together is to simply use the add parameter: age.males=age[which(sex=="M")] age.females=age[which(sex=="F")] hist(age.males, co

[R] how to plot two histograms overlapped in the same plane coordinate

2010-07-09 Thread Mao Jianfeng
Dear R-help listers, I am new. I just want to get helps on how to plot two histograms overlapped in the same plane coordinate. What I did is very ugly. Could you please help me to improve it? I want to got a plot with semi- transparent overlapping region. And, I want to know how to specify the fil