In my preamble I have both


Since the first one externalizes TikZ figures, while the second one is more aimed towards pgf figures.

But since every PFGPlot is a TikZ figure, it seems to me that the second external in the preamble is obsolete. Is this a wrong conclusion? (e.g. does PGF external also take care of axes).

Question short form: Is it obsolete to use PGF external if TikZ external is already used?


This quote from section 5.6 Image externalization of the pgfplots manual probably answers your question:

The external library has been written by Christian Feuersänger (author of pgfplots). It has been contributed to TikZ as general purpose library, so the reference documentation along with all tweaks can be found in [7, Section “Externalization Library”]. The command \usepgfplotslibrary{external} is actually just a wrapper which loads \usetikzlibrary{external} or, if this library does not yet exist because the installed pgf has at most version 2.00, it will load a copy which is shipped with pgfplots.

(7 is a reference to the manual for TikZ/pgf.)

So yes, given that the two are identical, having one is enough.

Small correction

Stefan Pinnow mentions in a comment that because pgfplots has a faster release cycle than TikZ, the version of the library that ships with pgfplots (as per the quote above) is in fact newer, with more bugs fixed, than that in TikZ.

For this reason it would be best to use



  • As Torbjørn already stated: In principal it is enough to load just one of the two libraries. But because TikZ has last been updated "a long time ago" the external library shipped with PGFPlots is "much newer" and has some bugs fixed. So I recommend using \usepgfplotslibrary{external} or \usetikzlibrary{pgfplots.external} which both load the external library of PGFPlots. Nov 30 '16 at 20:44
  • @StefanPinnow Thanks! I added a note on that to my answer. Nov 30 '16 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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