[R] how to plot multiple density functions in one graph

2010-01-04 Thread John Westbury
Hello, I am new to R and have two easy questions. How can you plot multiple density functions in one graph? I have five beta densities that I would like to plot in one graph. I understand how to plot one beta density as a line: plot (x,(dbeta(x,shape1=,shape2=,), type =l) Does the Pareto

Re: [R] how to plot multiple density functions in one graph

2010-01-04 Thread John Kane
?lines ?points --- On Mon, 1/4/10, John Westbury jrwestb...@gmail.com wrote: From: John Westbury jrwestb...@gmail.com Subject: [R] how to plot multiple density functions in one graph To: r-help@r-project.org Received: Monday, January 4, 2010, 3:13 PM Hello, I am new to R and have two

Re: [R] how to plot multiple density functions in one graph

2010-01-04 Thread David Winsemius
On Jan 4, 2010, at 3:13 PM, John Westbury wrote: Hello, I am new to R and have two easy questions. How can you plot multiple density functions in one graph? I have five beta densities that I would like to plot in one graph. I understand how to plot one beta density as a line: plot

Re: [R] how to plot multiple density functions in one graph

2010-01-04 Thread Dennis Murphy
Hi: Another approach to multiple plotting in base graphics is to use matplot, which is particularly convenient for something such as densities because the plots are of a similar character with the same domain. Here's an example: x - seq(0, 1, by = 0.01) d1 - dbeta(x, 2, 2) d2 - dbeta(x, 3, 3) d3