Re: [R] Graphing question (multiple line graphs arranged spatially)

From: John Kane <jrkrideau_at_yahoo.ca>
Date: Tue, 11 Mar 2008 10:28:54 -0400 (EDT)


I don't quite see how you can do this as a 3-dimenional graph but will something like this do what you want?

Note I used xx rather than c for the data.frame name.

plot(x$bas~x$month, type="b", col=1,
ylim=c(min(xx$bas),max(xx$bas)),

      xlim=c(max(xx$month),min(xx$month) ))

lines(y$bas~y$month, type="b", col=2)
lines(z$bas~z$month,  type="b", col=3)
lines(zz$bas~zz$month,  type="b",col=4)


> station month bas
> 190 5 0.000
> 190 7 1.563
> 190 10 0.000
> 190 11 0.000
> 202 4 18.750
> 202 5 18.750
> 202 7 6.250
> 202 10 4.800
> 202 11 3.125
> 198 4 18.750
> 198 5 31.250
> 198 7 3.125
> 198 10 3.200
> 198 11 12.500
> 205 4 0.000
> 205 5 0.000
> 205 7 0.000
> 205 10 0.000
> 205 11 0.000
>
> c<-read.table("foo.txt", header=TRUE)
> x<-subset(c, station=="190")
> plot(x$bas~x$month, type="b")
> y<-subset(c, station=="198")
> plot(y$bas~y$month, type="b")
> z<-subset(c, station=="202")
> plot(z$bas~z$month, type="b")
> zz<-subset(c, station=="205")
> plot(zz$bas~zz$month, type="b")
>
> I would like to put all of the all of these
> individual line graphs

> into one 3d graph organized by descending station
> (205-190). Does
> anyone know how to do this?
> thanks
>
> Stephen
>
>
>
>
>
> --
> Let's not spend our time and resources thinking
> about things that are
> so little or so large that all they really do for us
> is puff us up and
> make us feel like gods. We are mammals, and have not
> exhausted the
> annoying little problems of being mammals.
>
> -K. Mullis
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://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.
>

      Looking for the perfect gift? Give the gift of Flickr!



R-help_at_r-project.org mailing list
https://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. Received on Tue 11 Mar 2008 - 14:50:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 11 Mar 2008 - 15:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive