[R] Plotting continuous line types w/large datasets
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Nov 25 21:06:27 CET 2002
liston at cc.gatech.edu (Richard Liston) writes:
> Hi, R-Folks,
>
> I have 3 large datasets that I combined in a single plot with
>
> plot(ecdf(x1...),...)
> plot(ecdf(x2...),add=TRUE,...)
> plot(ecdf(x3...),add=TRUE,...)
>
> The datasets are very similar, so it is difficult to get visual
> separation among them. I tried many different line types without
> success -- the lines all came out solid. Checking further, plot.ecdf()
> calls plot.stepfun(), which calls segments() between each pair of
> points to plot. Since the points are so close together the lty
> parameter becomes meaningless, which is why the lines come out solid.
> I modified plot.stepfun() to call lines() for the whole vector of
> points, but this didn't seem to help. So my question is: is there a
> call I can make to plot a large dataset where the specified line type
> gets "continued" through all the points? Or perhaps someone can suggest
> a workaround.
Changing the colour might work better.
All the step function plotting seems afflicted by this. Compare
plot(sort(x),(1:10000)/10000, type="s", lty="dashed")
plot(sort(x),(1:10000)/10000, type="l", lty="dashed")
The latter might lead to a passable workaround.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list