When a node is scaled with transform shape and scale, the anchor border no longer lines up with the background path. At first I thought this was a bug in my own code, but I now realize that "standard" shapes (such as rectangle) do this, too. Here is a minimal example:
\documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[transform shape] \node [name=r,draw,rectangle,minimum height=2cm,minimum width=3cm, line width=0.25cm] {Rectangle}; \draw [shift=(r.0),green] plot [mark=x] coordinates {(0,0)}; \draw [shift=(r.north),green] plot [mark=x] coordinates {(0,0)}; \node [name=s,draw,scale=2,color=gray,rectangle,minimum height=2cm,minimum width=3cm, line width=0.25cm] {Rectangle}; \draw [shift=(s.0),cyan] plot [mark=x] coordinates {(0,0)}; \draw [shift=(s.north),cyan] plot [mark=x] coordinates {(0,0)}; \end{tikzpicture} \end{document} I expected the blue crosses to be on the border of the gray rectangle, as the green ones are on the black one.
How do I get around this? I think I know why it happens (it's because the lines do not scale but the outer x/y separations do, I think), but I'm not certain how to work around it. In this particular case, I'm trying to draw a picture that's exactly \textwidth wide in a document that shows points on the anchor border of a node, similar to those that appear in the PGF manual. It works fine if there is no scaling, but if I scale the node larger or smaller, those anchors do not lie in the right place.
I tried transform canvas={scale=2}, but that put the node in the upper left corner and cut most of it off.

outer sepexplicitly e.g.outer sep=0.0625cmin this case (which is half what you want, so ends up correct). or create a shape with anchors on the border of the undrawn shape and adjust appropriately when placing further elements.shapeis scaled (includingouter sep), but then you set theline width. Strangely indeed,outer sep=0.5\pgflinewidtheven specified after setting the line width does not help.line width=0.25cmin the optional argument to thetikzpictureenvironment does not change this behavior, either (though doing so makes the marks much thicker).