diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex | 131 |
1 files changed, 123 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex index bb5ea8de194..5086fef9d47 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.groupplots.code.tex @@ -28,6 +28,8 @@ \def\pgfplots@group@xticklabels{} \def\pgfplots@group@yticklabels{} +\def\pgfplots@group@xlabels{} +\def\pgfplots@group@ylabels{} \def\pgfplots@group@totalplots{1} \def\pgfplots@group@columns{1} \def\pgfplots@group@rows{1} @@ -54,14 +56,38 @@ /pgfplots/group/shared labels=false, /pgfplots/group/xticklabels at/.is choice, /pgfplots/group/xticklabels at/all/.code=\def\pgfplots@group@xticklabels{all}, - /pgfplots/group/xticklabels at/edge top/.code=\def\pgfplots@group@xticklabels{edgeT}, - /pgfplots/group/xticklabels at/edge bottom/.code=\def\pgfplots@group@xticklabels{edgeB}, + /pgfplots/group/xticklabels at/edge top/.code=\def\pgfplots@group@xticklabels{upper}, + /pgfplots/group/xticklabels at/edge bottom/.code=\def\pgfplots@group@xticklabels{lower}, /pgfplots/group/xticklabels at=all, /pgfplots/group/yticklabels at/.is choice, /pgfplots/group/yticklabels at/all/.code=\def\pgfplots@group@yticklabels{all}, - /pgfplots/group/yticklabels at/edge left/.code=\def\pgfplots@group@yticklabels{edgeL}, - /pgfplots/group/yticklabels at/edge right/.code=\def\pgfplots@group@yticklabels{edgeR}, + /pgfplots/group/yticklabels at/edge left/.code=\def\pgfplots@group@yticklabels{left}, + /pgfplots/group/yticklabels at/edge right/.code=\def\pgfplots@group@yticklabels{right}, /pgfplots/group/yticklabels at=all, + /pgfplots/group/xlabels at/.is choice, + /pgfplots/group/xlabels at/all/.code=\def\pgfplots@group@xlabels{all}, + /pgfplots/group/xlabels at/edge top/.code=\def\pgfplots@group@xlabels{upper}, + /pgfplots/group/xlabels at/edge bottom/.code=\def\pgfplots@group@xlabels{lower}, + /pgfplots/group/xlabels at=all, + /pgfplots/group/ylabels at/.is choice, + /pgfplots/group/ylabels at/all/.code=\def\pgfplots@group@ylabels{all}, + /pgfplots/group/ylabels at/edge left/.code=\def\pgfplots@group@ylabels{left}, + /pgfplots/group/ylabels at/edge right/.code=\def\pgfplots@group@ylabels{right}, + /pgfplots/group/ylabels at=all, + /pgfplots/group/x descriptions at/.is choice, + /pgfplots/group/x descriptions at/all/.style= + {/pgfplots/group/xlabels at=all,/pgfplots/group/xticklabels at=all}, + /pgfplots/group/x descriptions at/edge bottom/.style= + {/pgfplots/group/xlabels at=edge bottom, /pgfplots/group/xticklabels at=edge bottom}, + /pgfplots/group/x descriptions at/edge top/.style= + {/pgfplots/group/xlabels at=edge top, /pgfplots/group/xticklabels at=edge top}, + /pgfplots/group/y descriptions at/.is choice, + /pgfplots/group/y descriptions at/all/.style= + {/pgfplots/group/ylabels at=all, /pgfplots/group/yticklabels at=all}, + /pgfplots/group/y descriptions at/edge left/.style= + {/pgfplots/group/ylabels at=edge left, /pgfplots/group/yticklabels at=edge left}, + /pgfplots/group/y descriptions at/edge right/.style= + {/pgfplots/group/ylabels at=edge right, /pgfplots/group/yticklabels at=edge right}, /pgfplots/group/group name/.store in=\pgfplots@group@name, /pgfplots/group/empty plot/.style={/pgfplots/hide axis=true}, } @@ -83,6 +109,7 @@ % If there has been other plots before then end the plot % \ifnum0<\pgfplots@group@current@plot\relax + % DEBUG: \message{DEBUG: Ending plot} \endpgfplots@environment@opt \fi % Prepare for next plot, increment plot, row and column @@ -148,10 +175,97 @@ \fi% } +% +% Determine the labels of both x and y. +% +\def\pgfplots@group@determine@labels{% + \def\pgfplots@loc@TMPa{all} + \def\pgfplots@loc@TMPb{lower} + \ifx\pgfplots@loc@TMPa\pgfplots@group@xlabels% + % xlabels at=all + % Do nothing as all should have xlabels + \fi + \gdef\pgfplots@glob@TMPa{} + \ifx\pgfplots@loc@TMPb\pgfplots@group@xlabels% + % xlabels at=lower + \ifnum1<\pgfplots@group@rows\relax + \foreach \pgfplots@column in {1,...,\pgfplots@group@columns} {% + \foreach \pgfplots@row in {1,...,\pgfplots@group@rows} {% + \ifnum\pgfplots@row=\pgfplots@group@rows\relax% + \else + \expandafter\xdef\expandafter\pgfplots@glob@TMPa\expandafter{% + \pgfplots@glob@TMPa,/pgfplots/group/plot c\pgfplots@column r\pgfplots@row/.append style={/pgfplots/xlabel={}}}% + \fi + }% + }% + \fi% + \else + \def\pgfplots@loc@TMPb{upper}% + \ifx\pgfplots@loc@TMPb\pgfplots@group@xlabels% + % xlabels at=upper + \ifnum1<\pgfplots@group@rows\relax + \foreach \pgfplots@column in {1,...,\pgfplots@group@columns} {% + \foreach \pgfplots@row in {1,...,\pgfplots@group@rows} {% + \ifnum\pgfplots@row=1 % + \expandafter\xdef\expandafter\pgfplots@glob@TMPa\expandafter{% + \pgfplots@glob@TMPa,/pgfplots/group/plot c\pgfplots@column r\pgfplots@row/.append style={/pgfplots/xticklabel pos=upper}}% + \else + \expandafter\xdef\expandafter\pgfplots@glob@TMPa\expandafter{% + \pgfplots@glob@TMPa,/pgfplots/group/plot c\pgfplots@column r\pgfplots@row/.append style={/pgfplots/xlabel={}}}% + \fi + }% + }% + \fi% + \fi + \fi + % + % Defining styles for the y's + % + \ifx\pgfplots@loc@TMPa\pgfplots@group@ylabels% + % ylabels at=all + % Do nothing as all should have ylabels + \else + \def\pgfplots@loc@TMPb{left}% + \ifx\pgfplots@loc@TMPb\pgfplots@group@ylabels% + % ylabels at=left + \ifnum1<\pgfplots@group@columns\relax + \foreach \pgfplots@row in {1,...,\pgfplots@group@rows} {% + \foreach \pgfplots@column in {2,...,\pgfplots@group@columns} {% + \expandafter\xdef\expandafter\pgfplots@glob@TMPa\expandafter{% + \pgfplots@glob@TMPa,/pgfplots/group/plot c\pgfplots@column r\pgfplots@row/.append style={/pgfplots/ylabel={}}}% + }% + }% + \fi% + \else + \def\pgfplots@loc@TMPb{right}% + \ifx\pgfplots@loc@TMPb\pgfplots@group@ylabels% + % ylabels at=right + \ifnum1<\pgfplots@group@columns\relax + \foreach \pgfplots@row in {1,...,\pgfplots@group@rows} {% + \foreach \pgfplots@column in {1,...,\pgfplots@group@columns} {% + \ifnum\pgfplots@column=\pgfplots@group@columns\relax + \expandafter\xdef\expandafter\pgfplots@glob@TMPa\expandafter{% + \pgfplots@glob@TMPa,/pgfplots/group/plot c\pgfplots@column r\pgfplots@row/.append style={/pgfplots/yticklabel pos=upper}}% + \else + \expandafter\xdef\expandafter\pgfplots@glob@TMPa\expandafter{% + \pgfplots@glob@TMPa,/pgfplots/group/plot c\pgfplots@column r\pgfplots@row/.append style={/pgfplots/ylabel={}}}% + \fi + }% + }% + \fi + \fi% + \fi + \fi + \expandafter\pgfkeys\expandafter{\pgfplots@glob@TMPa} +} + +% +% Determine the ticklabels of both x and y. +% \def\pgfplots@group@determine@ticklabels{% \def\pgfplots@loc@TMPa{all} - \def\pgfplots@loc@TMPb{edgeT} - \def\pgfplots@loc@TMPc{edgeB} + \def\pgfplots@loc@TMPb{upper} + \def\pgfplots@loc@TMPc{lower} \ifx\pgfplots@loc@TMPa\pgfplots@group@xticklabels% % Do nothing as all should have xticklabels \fi @@ -184,8 +298,8 @@ % % Defining styles for the ytick's % - \def\pgfplots@loc@TMPb{edgeL} - \def\pgfplots@loc@TMPc{edgeR} + \def\pgfplots@loc@TMPb{left} + \def\pgfplots@loc@TMPc{right} \ifx\pgfplots@loc@TMPa\pgfplots@group@yticklabels% % Do nothing as all should have yticklabels \fi @@ -307,6 +421,7 @@ % \pgfplots@group@individual@setup \pgfplots@group@determine@ticklabels + \pgfplots@group@determine@labels \pgfplots@group@current@plot=0% \pgfplots@group@current@row=1% \pgfplots@group@current@column=0% |