Adding Ids to Lattice Plots

125 Views Asked by At

Using the Oats data from the nlme package, I wish to add the individual block names (I to VI) to the plot below.

I've read Add labels on lattice xyplot but I still don't quite understand it well and it doesn't answer my question.

Here's the code for the plot:

library(nlme)

xyplot(yield~nitro, data = Oats, groups=Block, type="l", main = "Oats data")

I just wanted to add that my original data has more than 20 Ids (unlike the Oats data which only has 6).

Thanks

0

There are 0 best solutions below