答案1
欢迎!这是一个开始。user1729210 已经告诉过您查看误差线,这在某种程度上充实了此建议。这些只是示例,如果您有表格形式的数据,则可以使用此代码的修改版本。有许多变体可以产生类似的结果。
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}[font=\sffamily]
\matrix{
\begin{axis}[ytick={0,1,2,3},
yticklabels={Turn circle,Length,Trunk space,Mileage},
minor ytick={0.5,1.5,2.5,3.5},yminorgrids]
\addplot+[only marks, color=blue,yshift=4pt,error bars/.cd,
x dir=both,x explicit,error mark options={scale=0}
] coordinates {
(-10,0) +=(200,0) -=(250,0)
(20,1) +=(30,0) -=(40,0)
(100,2) +=(110,0) -=(110,0)
(-100,3) +=(110,0) -=(110,0)
};
\addplot+[only marks, color=red,mark=*,yshift=-4pt,error bars/.cd,
x dir=both,x explicit,error mark options={scale=0}
] coordinates {
(-30,0) +=(600,0) -=(700,0)
(100,1) +=(40,0) -=(40,0)
(100,2) +=(110,0) -=(110,0)
(-10,3) +=(40,0) -=(50,0)
};
\draw[red] (0,0) coordinate (O) (O|-current axis.south)
-- (O|-current axis.north);
\end{axis}\\
\begin{axis}[ymin=-1.2,ymax=2.2]
\addplot[
error bars/.cd,
y dir=both,y explicit,
] coordinates {
(1910,-0.1) +=(0,0.5) -=(0,0.5)
(1920,-0.15) +=(0,0.35) -=(0,0.4)
(1930,0.1) +=(0,0.3) -=(0,0.25)
};
\end{axis}\\
};
\end{tikzpicture}
\end{document}