[R] add outer strip for levels in lattice plot (useOuterStrips alternative for Lattice)

Luigi Marongiu marongiu.luigi at gmail.com
Mon Jul 6 01:55:41 CEST 2015


Dear all,
I would like to add an outer strip or something like that on a lattice
plot I am making. Such plot contains 384 cells and, since I am not
interested in the axis values, I set:
           scales = list(
               x = list(draw = FALSE),
               y = list(draw = FALSE),
               relation="same"
               ),
on a xyplot from the LATTICE package.
Nevertheless there are axis labels which run like:
           ylab= "Y axis",
           xlab= "X axis",
I would like to place some more information regarding the individual
cells thus I would like to draw a sort of extra axis labels that are
similar to the outer strip of the LATTICE_EXTRA package, that is
markers placed between the axis labels and the axis values and
centered for each cells, typically placed on the top and left sides of
the plot. This is performed by the useOuterStrips function but:
a) LatticeExtra is not in the CRAN repository thus I have to install
it through a more laborious approach which makes LatticeExtra less
direct than Lattice
b)  useOuterStrips uses information directly from the data whereas I
will have to provide the extra information from ad hoc vectors not
present in the data set.

The question therefore is: is there a way to write text from a vector
in the top and left corners of a lattice xyplot and place the
individual elements at the centre of the rows and columns that compose
the graph?

Many thanks,
Luigi



More information about the R-help mailing list