[R] plot cdf

David L Carlson dcarlson at tamu.edu
Thu Jun 14 16:53:50 CEST 2012


Try this. It will turn off plotting the points, with 186 values, the points
are covering up the line.

x <- runif(186)*100000
plot(ecdf(x), do.points=FALSE)

?plot.ecdf  # to get help on the plot method used to plot ecdf
?plot.stepfun  # to get help on the plot method used to plot stepfun

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of MSousa
> Sent: Thursday, June 14, 2012 4:13 AM
> To: r-help at r-project.org
> Subject: [R] plot cdf
> 
> 
> 
> Good Afternoon,
> 
>  I'm trying to create a cdf plot, with the following code.    It works
> well,
> but I have little doubt, if you can help solve.    When I create the
> plot,
> like the graph line would still not appear with point
> 
> #cdf
> x<-table(Dataset$Apcode)
> View(s)
> hist(s)
> *plot(ecdf(x))*
> 
> x<-1	37607
> 2	26625
> 3	5856
> 4	25992
> 5	30585
> 6	16064
> 7	9850
> ..
> ...
> ..
> 186 52
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/plot-cdf-
> tp4633349.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list