search for: topfem

Displaying 1 result from an estimated 1 matches for "topfem".

Did you mean: topfen
2007 Aug 05
1
Selectively shading areas under two density curves
...Listers, I am drawing a plot of two density curves, for male and female incomes. I would like to shade/hatch/color (whatever) the areas under the curves which are distinctive for each gender. This is the code I have tried so far: m <- density(topmal.d$y, bw = "sj") f <- density(topfem.d$y, bw = "sj") par(mfrow = c(1,1)) plot(x = c(0,400), y = c(0,0.02), type = "n", bty = "l", xlab = "Annual earnings (in $thousands)", ylab = "Density") polygon(m, col = "blue", border = "blue", density = 20, angle = -45) po...