Update on Overleaf.

This commit is contained in:
2024-06-25 14:26:30 +00:00
committed by node
parent eaf2b40174
commit 3f2423043f
4 changed files with 646 additions and 353 deletions

View File

@@ -8,6 +8,9 @@
}}
\makeatletter
\pgfkeys{/tikz/coverage residual/.initial = 100\%}
\pgfkeys{/tikz/coverage latent/.initial = 0\%}
\pgfdeclareshape{coverage}{
% Minimum required anchors:
\savedanchor{\northeast}{
@@ -20,19 +23,19 @@
}
% Special Anchors, that can be calculated from the others (lazy calculation)
\anchor{south west} {\southwest}
\anchor{north east} {\northeast}
\anchor{north west} {\northeast \pgf@y=\pgf@y \pgf@x=-\pgf@x}
\anchor{south east} {\southwest \pgf@y=\pgf@y \pgf@x=-\pgf@x}
\anchor{west} {\southwest \pgf@y=0cm \pgf@x=\pgf@x}
\anchor{east} {\northeast \pgf@y=0cm \pgf@x=\pgf@x}
\anchor{north} {\northeast \pgf@y=\pgf@y \pgf@x=0cm}
\anchor{south} {\southwest \pgf@y=\pgf@y \pgf@x=0cm}
\anchor{center} {\pgfpointorigin}
\anchor{out 2} {\northeast \pgfpoint{0.5\pgf@x}{\pgf@y+0.2cm}}
\anchor{out 1} {\northeast \pgf@y=\pgf@y \pgf@x=-\pgf@x \pgfpoint{0.5\pgf@x}{\pgf@y+0.2cm}}
\anchor{in} {\southwest \pgf@y=\pgf@y \pgf@x=0cm \pgfpoint{0.5\pgf@x}{\pgf@y-0.2cm}}
\anchor{text} {\pgfpoint{-.5\wd\pgfnodeparttextbox}{-.5\ht\pgfnodeparttextbox+0.5cm}}
\anchor{south west} {\southwest}
\anchor{north east} {\northeast}
\anchor{north west} {\northeast \pgf@y=\pgf@y \pgf@x=-\pgf@x}
\anchor{south east} {\southwest \pgf@y=\pgf@y \pgf@x=-\pgf@x}
\anchor{west} {\southwest \pgf@y=0cm \pgf@x=\pgf@x}
\anchor{east} {\northeast \pgf@y=0cm \pgf@x=\pgf@x}
\anchor{north} {\northeast \pgf@y=\pgf@y \pgf@x=0cm}
\anchor{south} {\southwest \pgf@y=\pgf@y \pgf@x=0cm}
\anchor{center} {\pgfpointorigin}
\anchor{lat} {\northeast \pgfpoint{0.5\pgf@x}{\pgf@y+0.2cm}}
\anchor{res} {\northeast \pgf@y=\pgf@y \pgf@x=-\pgf@x \pgfpoint{0.5\pgf@x}{\pgf@y+0.2cm}}
\anchor{in} {\southwest \pgf@y=\pgf@y \pgf@x=0cm \pgfpoint{0.5\pgf@x}{\pgf@y-0.2cm}}
\anchor{text} {\pgfpoint{-.5\wd\pgfnodeparttextbox}{-.5\ht\pgfnodeparttextbox+0.5cm}}
\backgroundpath{
\pgfsetstrokecolor{black}
@@ -58,6 +61,19 @@
\southwest \pgf@ya=0.5\pgf@y \pgf@xa=0cm
\pgftext[at=\pgfpoint{\pgf@xa}{\pgf@ya}]{\bf Coverage}
\pgfusepath{stroke}
% Vertical Middle Line:
\northeast \pgf@yb=\pgf@y \pgf@xb=\pgf@x
\pgfpathmoveto{\pgfpoint{0cm}{0cm}}
\pgfpathlineto{\pgfpoint{0cm}{\pgf@yb}}
\pgfusepath{stroke}
% Left lable:
\northeast \pgf@ya=0.5\pgf@y \pgf@xa=-0.5\pgf@x
\pgftext[at=\pgfpoint{\pgf@xa}{\pgf@ya}]{\pgfkeysvalueof{/tikz/coverage residual}}
\pgfusepath{stroke}
% Right lable:
\northeast \pgf@ya=0.5\pgf@y \pgf@xa=0.5\pgf@x
\pgftext[at=\pgfpoint{\pgf@xa}{\pgf@ya}]{\pgfkeysvalueof{/tikz/coverage latent}}
\pgfusepath{stroke}
% Construct Output1:
\northeast \pgf@ya=\pgf@y \pgf@xa=0.5\pgf@x
\southwest \pgf@yb=\pgf@y \pgf@xb=0.5\pgf@x