I'm trying to zoom in a tikzpicture with the Spy library but I would like the shape of the magnifier to be given by a path (for example, a hexagon shape). Is it possible? And is it possible to show only the zoomed portion?
Here is a MWE taken for the pgfmanual:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{tikz}
\usetikzlibrary {decorations.fractals,spy}
\begin{document}
\begin{tikzpicture}[spy using overlays={size=12mm}]
\draw [decoration=Koch snowflake]
decorate { decorate{ decorate{ decorate{ (0,0) -- (2,0) }}}};
\spy [blue,magnification=5] on (1,0.5) in node at (1,-1);
\end{tikzpicture}
\end{document}

\path (1,1)--(0.5,0.5)--(1.5,0.5)--cycle– Pedro Jun 25 '20 at 16:16\clipis not working here: https://tex.stackexchange.com/questions/550140/zoom-in-a-tikz-mindmap. That is why I am trying with\spythat works. – Pedro Jun 25 '20 at 21:13clipfails to clip. I do not think you need or wantspyfor this purpose. Include a picture of what you seek and describe what is causing you problems. – hpekristiansen Jun 25 '20 at 21:56\clip(in the beginning of the code) clips but some path joints are not clipped. Strange behaviour. But executing\spyat the end of the code works perfectly. Can you please take a look at the link with my mindmap question? – Pedro Jun 26 '20 at 07:00