[R] Help with panel.text in Lattice - Putting labels for co-oridnates in a plot

RaoulD raoul.t.dsouza at gmail.com
Sun Oct 3 05:57:23 CEST 2010


I am trying to create a Lattice dotplot that has the following data graphed.
I need to put labels for each of the co-oridnates on the plot. I have
managed to get only one label dispalyed as I don't completely understand the
"panel.text" function. Can someone please help me?

# Sub Reason is a text field that I need to see the volumes for (Vols)

dotplot(DU_Summary_plotdata$SubReason ~ DU_Summary_plotdata$Vols
,horiz=TRUE,main="Top Sub-Reasons - Volumes (90% of Volumes)",
        panel = function(x, y, ...) {
            panel.dotplot(x, y, ...)
            panel.text(1,2,labels =DU_Summary_plotdata$Vols ,
                       pos = 4)

The dataset DU_Summary_plotdata is made up of:
SubReason<-c( SR_1, SR_2 , SR_3, SR_4, SR_5, SR_6, SR_7, SR_8)
Vols<-c( 33827,17757,11404,5999,5305,3515,3051,1924)

View this message in context: http://r.789695.n4.nabble.com/Help-with-panel-text-in-Lattice-Putting-labels-for-co-oridnates-in-a-plot-tp2952919p2952919.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list