PGFPlot 将箱线图分组,并带有“箱线图已准备好”

PGFPlot 将箱线图分组,并带有“箱线图已准备好”

我改编了以下代码这里

\begin{tikzpicture}[scale=.8,line width=1pt]
\begin{axis}[
boxplot/draw direction=y,
ylabel={Latency (\textmu s)},
xlabel={Packet Size (Bytes)},
height=8cm,
boxplot={
    %
    % Idea: 
    %  place the 
    %  group 1 at 0.3333 and 0.6666
    %  group 2 at 1.3333 and 1.6666
    %  group 3 at 2.3333 and 2.6666
    %  ...
    % in a formular:
    draw position={1/4 + floor(\plotnumofactualtype/3) + 1/4*mod(\plotnumofactualtype,3)},
    %
    % that means the box extend must be at most 0.33333 :
    box extend=0.2,
},
% ... it also means that 1 unit in x controls the width:
x=2cm,
% ... and it means that we should describe intervals:
xtick={0,1,2,...,10},
x tick label as interval,
xticklabels={%
    {64B},%
    {500B},%
    {1500B},%
},
x tick label style={
    text width=2.5cm,
    align=center
},
cycle list={{red},{blue},{black}},
]

\addplot
table[row sep=\\,y index=0] {
    data\\
    20\\
    516\\
    710\\
    503\\
    1253\\
};
\addplot
table[row sep=\\,y index=0] {
    data\\
    759\\
    419\\
    309\\
    883\\
    299\\
};
\addplot
table[row sep=\\,y index=0] {
    data\\
    684\\
    340\\
    700\\
    325\\
    377\\
};


\addplot
table[row sep=\\,y index=0] {
    data\\
    516\\
    480\\
    1356\\
    200\\
    736\\
};
\addplot
table[row sep=\\,y index=0] {
    data\\
    684\\
    340\\
    700\\
    325\\
    377\\
};
\addplot
table[row sep=\\,y index=0] {
    data\\
    759\\
    419\\
    309\\
    883\\
    299\\
};

\addplot
table[row sep=\\,y index=0] {
    data\\
    956\\
    320\\
    811\\
    330\\
    381\\
};
\addplot
table[row sep=\\,y index=0] {
    data\\
    684\\
    340\\
    700\\
    325\\
    377\\
};
\addplot
table[row sep=\\,y index=0] {
    data\\
    280\\
    749\\
    392\\
    870\\
    488\\
};

\end{axis}
\end{tikzpicture}

但是数据对我来说没有意义,即我不明白哪一个是最小值、最大值、中位数、第 n 四分位数。有机会使用箱线图已准备好在这个代码中?

相关内容