Re: [R] Adding data labels to Lattice plots

From: chandrasekhar ganduri <>
Date: Mon, 17 Dec 2007 10:01:15 -0500


I got something to work...thanks for the help.

Herez the code -

xyplot(MeanScore ~ PointsInTime, d2, groups=cat, type='o',

        xlab = "Points in Time", ylab = "Mean Score", aspect = 0.7,
        auto.key = list(points = TRUE, lines = TRUE, space = "right"),
        panel=function(x, y,...) {
           panel.xyplot(x, y,...)
        panel.text(d2$PointsInTime, d2$MeanScore,
        labels=round(d2$MeanScore, digits=2), pos=4, offset=0.8)


This takes care of the xyplot maintaining the lines and grouping, but not overlapping labels for which I could not find a solution


Chandrasekhar Ganduri
320 West Union St, APT # 105
Athens, OH - 45701
Ph: 740-274-9170

	[[alternative HTML version deleted]]

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 17 Dec 2007 - 15:05:56 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 Mon 17 Dec 2007 - 15:30:18 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.