[manual] `/pgfplots/boxplot/data filter/.code` not documented
Brought to you by:
cfeuersaenger,
ludewich
As @Schrödinger'sCat has mentioned in one of his answers on TeX.SX (tex.stackexchange.com) the key /pgfplots/boxplot/data filter/.code is not documented in the manual.
He suggested via email to add the following to the manual at the end of section 5.12.2. I suggest to add it after \pgfplots/boxplot/data={<expression>} in section 5.12.1.
\begin{pgfplotskey}{/pgfplots/boxplot/data filter/.code={\marg{code}} (initially empty)}
Allows the user to install a filter. This filter works very similarly to
the other filters.
%
\begin{codeexample}[]
\pgfplotsset{
only if/.style args={entry of #1 is #2}{
/pgfplots/boxplot/data filter/.code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifx\tempa\tempb
\else
\def\pgfmathresult{}
\fi
}
}
}
\begin{filecontents*}{data.dat}
v,set
0.1,a
0.2,a
0.3,a
0.8,b
0.9,b
1.0,b
\end{filecontents*}
\begin{tikzpicture}
\begin{axis}[
boxplot,
table/col sep=comma,
table/y=v,
boxplot/draw direction=y,
]
\addplot table [only if={entry of set is a}]
{data.csv};
\addplot table [only if={entry of set is b}]
{data.csv};
\end{axis}
\end{tikzpicture}
\end{codeexample}
%
\end{pgfplotskey}
done in commit https://sourceforge.net/p/pgfplots/code/ci/d962376b5ab77d084f730aedd230c386363032ac/