[R] draw two density functions at one graph

Jim Lemon jim at bitwrit.com.au
Sun Aug 23 14:29:37 CEST 2009

sendona essile wrote:
> I want to draw two density functions on the same graph. One of the densities is produced by density() and the other one is produced by logspline() . I want to show one of them by solid line and the other one by dashed line, but both of them on one graph.
> Sorry if this is plane and trivial, I don't know with what keyword I should search to find the answer.
Hi sendona,
Use "plot" for the first one and "lines" with lwd=2 for the second.


More information about the R-help mailing list