pgfplots、groupplot:如何读出和设置绘图长度

pgfplots、groupplot:如何读出和设置绘图长度

width=33mm我在 groupplot 中设置。这个宽度该怎么理解?
我以为应该是:“图形宽度”+标签距离,但好像是另一个值。
如何在 groupplot 中读出标签距离?

在此处输入图片描述

\documentclass[a4paper]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\usepgfplotslibrary{groupplots}
\begin{document}
\begin{tikzpicture}[]
\begin{groupplot}[group style={group size={2 by 2,},
horizontal sep=22mm, %vertical sep=1cm,
}, 
width=33mm,
y tick label style={draw},
ylabel style={draw},
]
\nextgroupplot[title={1}, ylabel=ylabel]
\addplot[]{x};
\nextgroupplot[title={2}, ylabel=ylabel]
\addplot[]{2*x};
\end{groupplot}

\draw[red, very thick] (group c1r1.south east) -- +(-33mm,0) node[midway, above, fill=yellow]{33mm}; 

% Does not work
%\pgfmathsetlengthmacro\ttt{\pgfkeysvalueof{/pgfplots/group/label distance}}
%\node[fill=yellow]{\ttt};
\end{tikzpicture}
\end{document}

相关内容