[R] Line plot with 3 points

Ott Toomet siim at obs.ee
Fri Jun 21 07:48:08 CEST 2002


On Thu, 20 Jun 2002, Roger Peng wrote:

  |Would something like this work? :
  |
  |df <- read.table("mydataframeblahblah")
  |yr <- range(c(df$onehr, df$fourhr, df$tenhr))
  |plot(0,0, type="n", ylim=yr, xlim=c(0, 10))
  |for(i in 1:nrow(df)) lines(c(1,4,10), df[i, c("onehr","fourhr","tenhr")])

  |On Thu, 20 Jun 2002, Pauline Gu wrote:
  |
  |> Dear R-experts,
  |> 
  |> I have a data file df as the following:
  |> 
  |> genename		variable at 1hr		variable at 4 hr variable 
  |> .
  |> .

Or use matplot().  E.g.

> a <- data.frame(rnorm(25,0), rnorm(25,5),rnorm(25,10))
> names(a) <- c("1 hr", "4 hr", "10 hr")
> matplot(1:3,t(a), type="l", xaxt="n")
> axis(1,at=1:3, label=names(a))

In this example, you can see a clear pattern.  But I am not shure, if you
can see anything with 5000 lines.

Ott

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