Skip to content
This repository has been archived by the owner on Sep 23, 2018. It is now read-only.

Empty tikzpicture created incorrectly #12

Closed
cameronbracken opened this issue Sep 8, 2010 · 1 comment
Closed

Empty tikzpicture created incorrectly #12

cameronbracken opened this issue Sep 8, 2010 · 1 comment
Labels
Milestone

Comments

@cameronbracken
Copy link
Collaborator

source('http://addictedtor.free.fr/graphiques/sources/source_122.R')

The function diagwl from the climatol package calls plot.new() which creates a new tikzpicture; then it calls par() which closes the tikzpicture without creating any content but throws in a \end{scope}, causing compilation to fail.

This is the offending chunk:

\begin{tikzpicture}[x=1pt,y=1pt]
\draw[color=white,opacity=0] (0,0) rectangle (505.89,505.89);
\end{scope}
\end{tikzpicture}

A tikzpicture should NOT be created when there is not content to put in. pdf() does not create a blank page here so we should not.

@cameronbracken
Copy link
Collaborator Author

Here is a minimal example to reproduce the bug:

tikz(standAlone=T)
plot.new()
plot(1)
dev.off()
system('pdflatex Rplots.tex')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants