[R] axis(): disable prevention of overlapping tick labels for pgfSweave()

Gerhard Schön G.Schoen at uke.de
Fri May 22 17:11:41 CEST 2009


 
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Dear R Users,

I'm using pgfSweave() form R-Forge.
How can I disable prevention of overlapping tick labels in axis()?
If I use axis() with Sweave("Test1", driver = "pgfSweaveDriver"), R 
treats the LaTeX-formatting as long strings, therefore tries not to draw 
overlapping.

Gerhard


\documentclass{article}
\usepackage{pgf}

\begin{document}

<<Test, echo = FALSE, fig = TRUE, pgf = TRUE>>=
plot(1:15, axes = FALSE, xlab = "")
axis(1, at = 1:2, tick = FALSE, line = 0, labels = 1:2)
axis(1, at = 1:7, tick = FALSE, line = 1, labels = 1:7)
axis(1, at = 1:2, tick = FALSE, line = 2, labels = paste("{\\textit{", 
1:2, "}}", sep = ""))
axis(1, at = 1:7, tick = FALSE, line = 3, labels = paste("{\\textit{", 
1:7, "}}", sep = ""))
@

\end{document}


-- 
Gerhard Schön
Department of Medical Biometry and Epidemiology
University Medical Center Hamburg-Eppendorf
Martinistr. 52, building W34
Phone: +49(40) 7410 57458
Fax:   +49(40) 7410 57790
Web: www.uke.de/imbe




More information about the R-help mailing list