[R] how do I get the legend?

2010-02-20 Thread casperyc

http://en.wikipedia.org/wiki/Binomial_distribution Bino 

Hi there,

How can I get the legend in the probability density plot in that 
http://en.wikipedia.org/wiki/File:Binomial_distribution_pmf.svg wiki page ?

and the cumalative plot as well?


# Binomial Distribution
x=0:40
plot(sin,ylim=c(0,.20),xlim=c(0,40),type='n',xlab=n,ylab=)
points(dbinom(x,20,0.5))
points(dbinom(x,20,0.7),col=2)
points(dbinom(x,40,0.5),col=3)


Thanks.

-- 
View this message in context: 
http://n4.nabble.com/how-do-I-get-the-legend-tp1563309p1563309.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how do I get the legend?

2010-02-20 Thread Peter Ehlers

On 2010-02-20 18:50, casperyc wrote:


http://en.wikipedia.org/wiki/Binomial_distribution Bino

Hi there,

How can I get the legend in the probability density plot in that
http://en.wikipedia.org/wiki/File:Binomial_distribution_pmf.svg wiki page ?



You can do this by studying help(legend).


and the cumalative plot as well?


And this by studying help(plot).

But it appears that you may have to work your way through some
introductory material on R first. There's plenty available.
Perhaps start with 'An Introduction to R'.

 -Peter Ehlers




# Binomial Distribution
x=0:40
plot(sin,ylim=c(0,.20),xlim=c(0,40),type='n',xlab=n,ylab=)
points(dbinom(x,20,0.5))
points(dbinom(x,20,0.7),col=2)
points(dbinom(x,40,0.5),col=3)


Thanks.



--
Peter Ehlers
University of Calgary

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.