I am struggling labeling an axis in a plot.

Here is a minimal example illustrating the point:


pdf("mve.pdf",width=5,height=5)
ypos <- c(1:3) * 1e6
ylabs <- sapply(ypos/1e6, function(i) as.expression(bquote(.(i)%.%10^6)))
plot(rep(1,3), ypos, yaxt="n", ylab="")
axis(2, at=ypos, labels=ylabs, las=1)
dev.off()


First, I find the space left and right of the \cdot operator rather larger. Is there a way to decrease it?

Second, and more important, in the generated PDF, the space left of the dot is much bigger, it looks as if it was typeset as e.g. "3 *10^6".

Thanks for any hint

Pascal

______________________________________________
R-help@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.

Reply via email to