Where can I find the TikZ spy package?
I found a great article here: How to create magnified subfigures and corresponding boxes for portions of a large image

Even with Google and StackExchange search I can’t find a site to download the package. Can anyone help me?

  • If you check the accepted answer on the question you linked to, you will find lines containing \usepackage{tikz} and \usetikzlibrary{spy}. May 10, 2013 at 18:22
  • if i try this: \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{spy} i get this message: ! I can't find file tikzlibraryspy.code.tex.... Without \usetikzlibrary{spy} tikz works fine.
    – romi1013
    May 10, 2013 at 18:28
  • You most likely have an outdated PGF/TikZ installation. You should update your TeX distribution. May 10, 2013 at 18:36

1 Answer 1


spy is a TiKZ library not a package so it comes with TiKZ although its name in CTAN is pgf.

As Qrrbrbirlbel explains, you need to first load Tikz with \usepackage{tikz} and later any tikzlibrary with \usetikzlibrary{spy}.

You can find some more information abouts tikzlibraries in List of available TikZ libraries with a short introduction


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.