Skip to content

Removing tick marks and Adding labels to lattice plots

2 messages · kateF87, David Winsemius

#
Hi all, 

I am trying to remove the current labels of the tick marks and replace them
with text using xyplot within lattice


right now I have tick marks at 1, 1.5, 2, 2.5, 3 I would like to transform
them to say 'T1', 'T2', 'T3' 


thanks in advance
Kathleen
#
On Nov 20, 2010, at 6:32 PM, kateF87 wrote:

            
In the xyplot documentation you will find the controls for ticks and  
labels in the scale section. You have not given a well-formed example   
because the number of labels does not align with the number of ticks  
so I am going to assume there are currently 5 ticks to be relabeled.  
Perhaps something along these lines:

xyplot( <some-formula> ,
          data=<dfrm,
           scales=list(x=list(labels=c('T1', 'T2', 'T3' , 'T4',  
'T5'))) )

Notice the way the arguments are all packaged as nested lists. That  
the way lattice works.