![写出组名以及标签 tikz 水平条形图](https://linux22.com/image/417016/%E5%86%99%E5%87%BA%E7%BB%84%E5%90%8D%E4%BB%A5%E5%8F%8A%E6%A0%87%E7%AD%BE%20tikz%20%E6%B0%B4%E5%B9%B3%E6%9D%A1%E5%BD%A2%E5%9B%BE.png)
我有一个水平条形图,如下图所示。我需要将条形图分组为 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}