I've tried several approaches, including qqmath
, lattice
densityplot()
and a number of panel functions like panel.mathdensity
and panel.densityplot
. However, I couldn't get them to do what I want them to do.
An internet search on this topic produces results which focus either on base plots in R or don't draw both distributions in one panel. I could use R base graphics, however, I also want to plot several distribution pairs and one panel for each pair.
The books "RGraphics" and "Lattice: Multivariate Data Visualization with R" couldn't enlighten me in this area either.
The data usually looks something like this:
data <- dgamma(seq(from=0.00001,to=0.01,by=0.00001),shape = .1, scale = .01)
I'm open to either lattice
or ggplot
package, although I have more experience using lattice
.
Please let me know if you need any more information to help me out here.