我有一个水平条形图,如下图所示。我需要将条形图分组为 3 个,如图所示,即我要放置花括号并写上“Group1/Group2/Group3”,如图所示。我该怎么做?另外,是否可以在组之间画一条虚线水平线?
目前,我正在使用 TikZ pgf-plot 来实现这一点,但我也可以采用其他替代方案
示例代码:
\begin{tikzpicture}
\begin{axis}[
width=10cm,
height=10cm,
enlargelimits=false,
xbar=0pt,
xmin=0.0,
xmax=1.0,
ymin=0.5,
ymax=17.5,
bar width=0.4,
ytick={17,16,\ldots,1},
yticklabels={MSE,SSIM,VGG-19 MSE,VGG-19 cosine similarity,ST-MAD,VMAF, ,BRISQUE,NIQE,Inception Score (conditional),Video BLIINDS, Li \etal, , SSA Baseline, Our Model - VGG-19, Our Model - Inception-v3, OurModel - ResNet-50},
yticklabel style={text height=1ex},
xlabel=Median SROCC (with std dev),
]
\addplot+[error bars/.cd,
x dir=both,x explicit]
coordinates {
(0.4044,17) +- (0.11, 0.0)
(0.5274,16) +- (0.09, 0.0)
(0.5364,15) +- (0.08, 0.0)
(0.6404,14) +- (0.08, 0.0)
(0.3730,13) +- (0.12, 0.0)
(0.6003,12) +- (0.09, 0.0)
(0.0905,10) +- (0.11, 0.0)
(0.0819,9) +- (0.12, 0.0)
(0.0828,8) +- (0.11, 0.0)
(0.4072,7) +- (0.10, 0.0)
(0.6371,6) +- (0.09, 0.0)
(0.7188,4) +- (0.06, 0.0)
(0.7418,3) +- (0.06, 0.0)
(0.7922,2) +- (0.06, 0.0)
(0.8304,1) +- (0.04, 0.0)
};
\end{axis}
\end{tikzpicture}