You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\documentclass[tikz]{standalone}
\usetikzlibrary{spy}
\begin{document}
\begin{tikzpicture}[
spy using outlines = {%
magnification = 2,
size = 3cm,
connect spies,
anchor = north, % <==
}
]
\coordinate (top) at (3,5);
\draw (0,0) sin (top) cos (6,0);
\spy on (top.north) in node at (3,2);
\end{tikzpicture}
\end{document}
produces:
where the spied on square doesn't match the magnified one. Notice that the in the top square the line touches the upper edge, but in the magnified square the line goes through the middle.
The code works correctly if I comment anchor = north. If I brute-force change the line:
The code:
produces:
where the spied on square doesn't match the magnified one. Notice that the in the top square the line touches the upper edge, but in the magnified square the line goes through the middle.
The code works correctly if I comment
anchor = north
. If I brute-force change the line:pgf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
Line 101 in 25d4a60
to read:
instead, then the output is correct (only when
anchor = north
, of course).I'm guessing that the
anchor
option in that node should account for the anchor of the upper node as well.The text was updated successfully, but these errors were encountered: