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

Duncan Mackay dulcalma at bigpond.com
Tue Jul 7 01:19:52 CEST 2015


Hi Luigi

Not exactly sure what you want

Have a look at 
https://stat.ethz.ch/pipermail/r-help/2007-May/132785.html
and
https://stat.ethz.ch/pipermail/r-help/2007-July/135551.html

otherwise have a look at ?trellis.focus and
https://stat.ethz.ch/pipermail/r-help/2006-July/109585.html

failing that ?gridRect and ?gridText from library(grid)

Regards

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au

-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Luigi
Marongiu
Sent: Monday, 6 July 2015 09:56
To: r-help
Subject: [R] add outer strip for levels in lattice plot (useOuterStrips
alternative for Lattice)

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

______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list