[R] Newbe Q: Some plotting diffculty..

Ott Toomet siim at obs.ee
Tue Jan 29 15:58:10 CET 2002


Hi,

what I suggest is basically matplot() too, but in this way you will have
more explicit control.

Assume you have a dataframe df with variables var1, var2 etc.  It also
assumes you have the observations taken after a constant time interval
(otherwise you should have a variable time).  Plot

plot(df$var1)
points(df$var2, pch=2)
points(df$var3, pch=3)

etc.
You notice probably that the y-scale of the graph is good for the first
variable but not for the following ones.  In that case you may use

plot(df$var1, ylim=range(c(df$var1, df$var2, ...)))

instead of just plot() as in the first example.


Best wishes,

Ott Toomet



On Tue, 29 Jan 2002, Fredrik Karlsson wrote:

> Hi all.
>
> I've got a NUBQ for you all:
>
> I've got a data-frame contining variables i columns named after the
> specified subject and with data which represents time of observation.
>
> What I would like to do is to get a plot with observation time on the
> ordinate and subject on the abscissa -- kind of a "at what time did I
> observe the subjects?" summary..
>
> Please help me..
>
> /Fredrik
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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