(a) ecdf() could be an overkill for this. At 10000 points, plot(sort(x), ppoints(x), type="l") should be quite close enough. Also, plot.ecdf() draws lots of individual horisontal line segments which all start in the same way. If you have enough of them, they reduce to a single pixels which are all "on". If you draw a continuous line, at least there is a chance to get dotting and dashing to work. However...
(b) It is a generic problem to get dash/dot patterns to cycle correctly along multisegment lines. Some device drivers are better at it than others.
The following looks OK for me, but not on the quartz() screen device.
x <- rnorm(10000)
On 13 Jun 2016, at 22:57 , A A via R-help wrote:
As per the title, I'd like to generate a dashed/dotted CDF plot of my data using ecdf. Unfortunately, it seems like I can't get the plot to look dashed/dotted even after specifying it in the plot function. I suspect this may be because of the high number of data points. Here's a short sample of code that illustrates my issue:
#change to 1:100 to see the dotted line
x = 1:10000
e = ecdf(x)
plot(e,do.púLSE, lty = "dotted")
Is there a way to solve this problem?
[[alternative HTML version deleted]]
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, seehttps://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.
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Office: A 4.23
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com