By range on the y-axis, do you mean distance? It would have to be if time is on your x? Or am I misreading this?
You could just plot() with the data for your first individual, and then add additional individuals after that using lines(), specifying a different colour and/or line type for each individual, and could even plot points as well to identify your actual data collection points. Alternatively, you could do a bunch of multi-panel plots with the same axes, and individual data is given in each plot. It sounds like this is what you want to do by referencing stackplot() (based on it's description, I've never used it)? If so, see ?par for details, specifically mfrow, mfcol. By doing it with calls to par(), I think you'll have more control over the appearance of the plot than with stackplot(). Mike On Thu, Sep 23, 2010 at 8:50 AM, Struve, Juliane <j.str...@imperial.ac.uk>wrote: > Dear list, > > I would like to create a time series plot in which the paths of several > individuals are stacked above each other, with the x-axis being the total > observation period of three years ( 1.1.2004 to 31.12.2007) and the y-axis > being some defined range[min,max]. > > My data consist of Date/Time information and the paths of 45 individual as > the distance from the location of release. An example data set for 2 > individuals is given below.The observation period and frequency of > observations varies between individuals. > > I believe stackplot() may be able to do this task, but I am not sure how to > handle the variable time period and frequency of observations for different > individuals. Could someone advise if stackplot() is suitable or if there is > a better approach or package ? > > Thank you very much for your time and best wishes, > > Juliane > > > Individual 1 > > Date Distance [m] > > 2006-08-18 22:05:15 1815.798 > 2006-08-18 22:06:35 1815.798 > 2006-08-18 22:08:33 1815.798 > 2006-08-18 22:09:49 1815.798 > 2006-08-18 22:12:50 1815.798 > 2006-08-18 22:16:26 1815.798 > > Individual 2 > > Date Distance [m] > 2006-08-18 09:53:20 0.0 > 2006-08-18 09:59:07 0.0 > 2006-08-18 10:09:20 0.0 > 2006-08-18 10:21:14 0.0 > 2006-08-18 10:34:18 0.0 > 2006-08-18 10:36:44 100.2 > > > > 2 Date Distance > 6 2006-08-18 09:53:20 0.0 > 7 2006-08-18 09:59:07 0.0 > 8 2006-08-18 10:09:20 0.0 > 9 2006-08-18 10:21:14 0.0 > 10 2006-08-18 10:34:18 0.0 > 11 2006-08-18 10:36:44 100.2 > 006-03-1 22:05:15 1815.798 > 2006-03-18 22:06:35 1815.798 > 2006-03-18 22:08:33 1815.798 > 2006-03-18 22:09:49 1815.798 > 2006-03-18 22:12:50 1815.798 > 2006-03-18 22:16:26 1815.798 > > > > > Dr. Juliane Struve > Imperial College London > Department of Life Sciences > Silwood Park Campus > Buckhurst Road > Ascot, Berkshire, > SL5 7PY, UK > > Tel: +44 (0)20 7594 2527 > Fax: +44 (0)1344 874 957 > > http://www.aquaticresources.org > ______________________________________________ > R-help@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<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@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.