How can I use stripplot from the lattice package with a log y axis? With plot, I can use the argument log and specify which axes I want on a log-scale. Is there some way of doing this with stripplot without recourse to taking the log of the numeric data and then specifying the y axes points?
Example code using singer data:
stripplot(voice.part ~ height, data = singer, aspect = 1,
jitter.data = TRUE, xlab = "Height (inches)")
NB. This data doesn’t need to be on a log scale, I’m just using it as an example
Fine tuning of the axes in plots with the lattice package are handled by the
scalesargument (see the appropriate entry on the?xyplotpage). This argument is essentially a list, and two of the list components can bexandy, which are also lists with components that control the appearance of the x- and y-axes, respectively.For a log scale on the x axis, use
Replace
2with whatever log base you want.