Bengoechea Bartolomé Enrique (SIES 73)
2008-Nov-05 10:27 UTC
[R] Lattice equivalent of axis(..., hadj=0)?
Hi, I'm trying to show categories labels on the y-axis of a lattice barchart
left-aligned instead of the default right-aligned.
That is, in the following example code:
x <- c(14.16, 9.98, 14.59, 15.24)
names(x) <- c("Banks & Finance", "Technology",
"Non-Cyclicals", "Communications")
barchart(x)
I want the labels "Banks & Finance", etc, left-aligned close to
the plot left edge instead of right-aligned close to the y axis.
I can do it in traditional plots leaving extra space with par(mar), then using
axis(..., hadj=0). But I find no easy alternative in lattice. panel.axis()
doesn't seem to have any option for horizontal alignment of labels...
Is there some easy way to get it, or I must program it?
Best,
Enrique
[[alternative HTML version deleted]]