[R] Lattice / Trellis analog of axis(graphics) ?

Deepayan Sarkar deepayan.sarkar at gmail.com
Wed Jan 3 22:30:20 CET 2007


On 1/3/07, Derek Eder <derek.eder at lungall.gu.se> wrote:
> My question is so basic that I am (almost too) embarrassed to admit that
> I could not find an answer after an hour's worth of homework.
>
> What is the Trellis / Lattice analog for the axis(graphics) function
> that enables the creation of axes in locations other than the default
> (i.e., bottom for X axis and right for Y axis) ?
>
> For example when plotting mileage against weight (in American units),
> one might want to also include a second X axis on the top margin (e.g.,
> axis() pos = 3) with fuel mileage in metric units.
>
> xyplot(Mileage ˜ Weight, data = fuel.frame)

You might find the help page ?axis.default (and its example) useful.

-Deepayan



More information about the R-help mailing list