How to ensure that the set width of pgfplot figure is correctly applied in case I do not have a label?
Please consider the example below
\documentclass{article}
\usepackage{pgfplots,calc,filecontents,tikzscale}
\begin{filecontents*}{test.tikz}
\begin{tikzpicture}%
\begin{axis}[width=120pt,height=3cm]%
\addplot[domain=-3:3] {sin(deg(x))};%
\end{axis}%
\end{tikzpicture}%
\end{filecontents*}
\begin{filecontents*}{test-label.tikz}
\begin{tikzpicture}%
\begin{axis}[width=120pt,height=3cm,ylabel=ylabel]%
\addplot[domain=-3:3] {sin(deg(x))};%
\end{axis}%
\end{tikzpicture}%
\end{filecontents*}
\def\mymacro{\input{test.tikz}}
\def\mymacrolabel{\input{test-label.tikz}}
\def\mymacroscaleonlyaxis{\includegraphics[width=120pt,height=3cm]{test.tikz}}
\def\mymacrolabelscaleonlyaxis{\includegraphics[width=120pt,height=3cm]{test-label.tikz}}
\newlength{\test}
\begin{document}
\mymacro%
\settowidth{\test}{\mymacro}%
\the\test
\mymacrolabel%
\settowidth{\test}{\mymacrolabel}%
\the\test
\mymacroscaleonlyaxis%
\settowidth{\test}{\mymacroscaleonlyaxis}%
\the\test
\mymacrolabelscaleonlyaxis%
\settowidth{\test}{\mymacrolabelscaleonlyaxis}%
\the\test
\end{document}
The cases where a ylabel is set, are scaled almost correctly (ca. 118pt instead of the desired 120pt). But the figures without label are not scaled correctly in either case. How to fix that?

