# But where is my scale pgfkeys? [duplicate]

I'd like to access to the /tilz/scale, the pgfkeysvalueof returns an empty string.

Is there a .store macro dedicated to ?

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=2]

\node {*\pgfkeysvalueof{/tilz/scale}*} ;

\end{tikzpicture}
\end{document}

• I think scale might be a style for x scale and y scale (I never remember if with spaces or not). Maybe try to get the values of one of those. – gigabytes Mar 9 '18 at 8:38

The scale is not stored in the form you expect: it's passed directly to the pgf base layer. If you try

\documentclass{article}
\usepackage{tikz}
\pgfkeys{/tikz/scale/.show code}


you get

> \pgfkeysshower=\long macro:
\pgfkeys@code ...keysshower }\show \pgfkeysshower


i.e. there is a TikZ wrapper passing to \pgftransformscale. The latter stores the data in a matrix: one can recover it using \pgfgettransformentries or \pgfgettransform (the latter has everything in one macro):

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\pgfkeys{/tikz/scale = 2}
\pgfgettransformentries\aa\ab\ba\bb\xhsift\yshift
\show\aa
\show\ab
\show\ba
\show\bb
\end{tikzpicture}
\end{document}