Re: [R] Adding data labels to Lattice plots

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


Hi,

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

Chandra

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

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_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.
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.