[R] help on plotting series with different x-axis values on a graph with one x-axis
jrkrideau at inbox.com
Sun Feb 10 14:38:01 CET 2013
No image. png files seem to make it through so if you save as png it should arrive.
Some sample code and data would help
Is the data in one data.frame or could you put it into one? If so you might want to try melting the data (see reshape 2 package) and plotting with ggplot2
Kingston ON Canada
> -----Original Message-----
> From: emth at kt.dtu.dk
> Sent: Sat, 9 Feb 2013 12:52:32 +0000
> To: r-help at r-project.org
> Subject: [R] help on plotting series with different x-axis values on a
> graph with one x-axis
> I have run into this problem a couple of times now and hope you can help!
> If I want to plot mulitiple series with differing x-axis values
> (however, all in the same range) in 1 plot with one common axis R
> obstruses the plots.
> E.g. if I plot water content against time and I start with the sampler at
> 5 cm depth, it plots that one right.
> But the next depth, 15 cm, is measured at slightly different time
> intervals and so R will not plot the series correctly.
> Reading in the data using “ stringsAsFactors=FALSE” helps, but the lines
> are still plottet in an akward fashion (edgy) , see attached image.
> Hope you can help!
> Eike Marie Thaysen
> Ph.d. studerende
> Institut for Kemiteknik DTU
> Danmarks Tekniske Universitet
> Risø Campus
> Frederiksborgvej 399
> Bygning 309
> 4000 Roskilde
> Telefon: 51801481
> emth at kt.dtu.dk<mailto:emth at risoe.dtu.dk>
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails
More information about the R-help