S-News readers,
I've been trying to figure out how to format axis labels in trellis
graphs. In particular, I'd like to use the format function to turn off
scientific notation, add a comma separator for thousands, etc. For
example, in the past I've used the following argument to the axis
function for traditional graphs: labels= format(x, scientific= FALSE,
big.interval= 3, big.mark= ",", justify= "none"). For trellis graphs, I
know that I can use the scales= argument to specify specify options for
either the x axis or the y axis (specified as a list object), and I also
know that I can use labels= as one of the listed arguments. What is
stumping me, though, is how to specify the object that is passed to the
format function to be formatted when I use the tick.number= argument for
the scales= argument. In other words, I like the positions of the tick
marks that tick.number= determines, but I haven't figured out how to
format the labels for those tick marks. Does someone know how to do
this? Alternatively, is there a way to return the tick marks determined
by tick.number= so that I can pass it to the format function?
Thanks in advance for your help and ideas.
-Paul Schwarz
|