[R] Lattice: Understanding How Points Connected by Lines

Rich Shepard rshepard at appl-ecosys.com
Sun Jan 1 23:50:37 CET 2012


   A data frame has one factor, one date, and one numeric column. When I plot
these using the default pch of the open circle (first attachment),

xyplot(TDS ~ sampdate | she.s, data = sheep.cast, main = 'TDS in Sheep
Creek', ylab = 'Concentration (mg/L)', xlab = 'Time')

I see the higher concentration points toward the right on several panels.
But, when I change to using a line type (second attachment),

xyplot(TDS ~ sampdate | she.s, data = sheep.cast, type = 'l', main = 'TDS in
Sheep Creek', ylab = 'Concentration (mg/L)', xlab = 'Time')

the higher concentrations are connected to points far to the left (earlier
years). I expected to see a line with a few spikes toward the right sides of
the panels.

   Where do I start to look for the reason for this behavior?

TIA,

Rich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sheep-TDS-year-dot.pdf
Type: application/pdf
Size: 6593 bytes
Desc: 
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120101/1ff6eec5/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sheep-TDS-year-line.pdf
Type: application/pdf
Size: 6317 bytes
Desc: 
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120101/1ff6eec5/attachment-0001.pdf>


More information about the R-help mailing list