[R] lattice: axis ticks, axis alignment and remove axis from plot
Katharina May
may.katharina at googlemail.com
Wed Jun 17 11:24:17 CEST 2009
Hi there,
I'm a bit confused concerning the axis tck setting in the lattice
package as the ticks on left sided axis aren't
drawn at all with the following setting:
dados <- data.frame(varsep = factor(rep(1:2,10)),
i = runif(20))
library(lattice)
my.theme <- list(
axis.components = list(left = list(tck = 1, pad1 = 1, pad2 =
2), top = list(tck = 0, pad1 = 1, pad2 = 0), right = list(tck = 0,
pad1 = 1, pad2 = 0), bottom = list(tck = +0.5, pad1 = 1, pad2 = 2)))
trellis.par.set(theme = my.theme)
bwplot(varsep ~ i, dados,
xlab = names(dados)[1],
ylab = names(dados)[2],
panel = function(...) {
panel.grid(v = -1, h = 0)
panel.bwplot(...)
})
Maybe somebody can help me recognise the problem why the left sided
ticks are not drawn.
I'm also wondering how to tell the trellis object not to draw the
right and top axes at all an how to align the y axis
that it goes through x=0?
Thanks,
Katharina
More information about the R-help
mailing list