Re: [R] plotting in R

About this list Date view Thread view Subject view Author view Attachment view

From: Jason Turner (jasont@indigoindustrial.co.nz)
Date: Mon 03 May 2004 - 11:55:22 EST


Message-id: <4095A68A.1080503@indigoindustrial.co.nz>

Karla Meurk wrote:

> Hi there, I have 2 questions which I cannot find answers for in Dalgaard
> or the helpfiles currently available.
>
> (1) I wish to plot 3 ecdf plots on one graph. Is there any way of
> holding a figure to plot all on the same plot. I can't get an ecdf for
> any plot command other than "plot" or "ecdf.plot" so using lower level
> command is no good, have also tried x11().

Not familiar with plotting ecdf objects, but the following might be
helpful...

a) str() to find the structure of the ecdf object (if the help page for
ecdf's "Value" section isn't clear enough), then use "lines" to put the
lines on.

b) par(new=TRUE), before replotting, then plot(..., xaxt="n", yaxt="n")
to prevent re-drawing the axes.

> (2) If I have three curves on a plot how can I label each curve so the
> label sits directly above the curve?

?text. To select where the text goes, you can work out the
co-ordinates, or use mouse clicks, as in...

text(locator(1),"Curve 1")
text(locator(1),"Curve 2")
...

and click at the points you want the text.

Cheers

Jason

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST