TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is not a major problem but all the same I would like to confirm that I am not doing anything wrong. Geometry package with showframe=true option is used to see if all the figures are within the margins. Also, tikz external library is used and the plot shows some spurious horizontal and vertical lines.

wrong plot

This happens only if showframe=true is set in geometry and the tikz external library is used. If external is switched off, the plot is drawn correctly. As I said earlier, since I am not going to display frame in the final draft, this is not a major issue.



%Comment out to not use external library and get correct figure.

share|improve this question
I think the comment of @JLDiaz should become an answer. Apparently, both packages change the TeX \shipout routine. As long as the resulting bounding box is correct... – Christian Feuersänger Jan 3 '13 at 19:34
@JLDiaz Can you convert your comment to an answer? – percusse Mar 11 '13 at 21:05
@percusse Done. – JLDiaz Mar 12 '13 at 0:33
up vote 5 down vote accepted

Those spurious lines are the ones drawn by geometry package to delimit the position of the header and the main body.

Apparently when external mode is used, tikz draws the figure in the upper left corner of the page, and crops it at the appropiate size, but the layout marks are still visible.

share|improve this answer

I had the same problem and fixed it by writing the following after the \tikzexternalize command:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.