TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I'm having an issue where only one out of multiple figures is recreated despite the use of the tikz/external library. I've created a MWE which shows the same effect with only two figures.

Below is my main file which is compiled with pdflatex -shell-escape file.


\graphicspath{ {./figures/}{./figures-tikz/} }


    \caption{Scalability plot for dDE, MPC, dDE$^-$ and a hill climber on the Scalable-Building-Block problem.}

    \caption{Same as in Figure~\ref{fig:scalability-plot-all-sbb-2-optima}, but y axis is in logscale.}

The first figure is re-created every time I run pdflatex. I tried changing the ordering of the two, but it does not make a difference --- the figure with the filename scalability-plot-all-sbb-2-optima is the one that's always re-created even though the other figure is identical but with a semilogyaxis instead. The TikZ files for both are merely five addplot commands which load data from five different .dat files. Showing everything here would take up a lot of space, so here's a link to the whole directory structure, including the .tex, .tikz and .dat files.

I've found that if I keep only one addplot, the figure is not re-created. I was wondering whether this is a bug, whether LaTeX is confused by my directory structure, or whether it's simply a mistake on my part.

share|improve this question
Is this really a MWE, do you need all those packages to reproduce the problem? – Miguel de Val-Borro Jul 14 '13 at 18:35
I left it this way in case there was a package incompatibility issue. – sudosensei Jul 14 '13 at 19:29
up vote 1 down vote accepted

With my very limited LaTeX knowledge, I decided to inspect the log file (file.log) to try to identify what went wrong. I noticed that right after the convert command that causes the picture to be re-generated, there was an error of this sort:

Overfull \hbox (17.03157pt too wide) in paragraph at lines 1--76

This led me to believe that tikzscale was not capable of scaling the picture to the exact size I requested, and this caused a mismatch between what tikzscale thought the size of the picture was and what it actually was. So what I did was follow the instructions listed in this answer to remove the whitespace from around the x and y labels (basically try to help tikzscale).

The problem is now fixed. The Overfull \hbox warning no longer appears and the picture is not re-generated every time. I do not know whether this is the expected behaviour or whether this is a bug though.

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.