![水平条形图,两端都有文本,图表上有刻度标记](https://linux22.com/image/418717/%E6%B0%B4%E5%B9%B3%E6%9D%A1%E5%BD%A2%E5%9B%BE%EF%BC%8C%E4%B8%A4%E7%AB%AF%E9%83%BD%E6%9C%89%E6%96%87%E6%9C%AC%EF%BC%8C%E5%9B%BE%E8%A1%A8%E4%B8%8A%E6%9C%89%E5%88%BB%E5%BA%A6%E6%A0%87%E8%AE%B0.png)
答案1
\documentclass[tikz, margin=3mm]{standalone}
\usepackage{siunitx}
\usetikzlibrary{positioning,calc}
\begin{document}
\begin{tikzpicture}
\draw[line width=12pt, blue]
(0,0)node[label=left:Introversion](a){} -- (8,0)node[label=right:Extroversion](b){};
\draw[line width=6pt,yellow!95!green!90!red!40] ($(a)!0.80!(b)$)node[](c){}--++(0,1cm);
\end{tikzpicture}
\end{document}
编辑挤压黄色部分的黑色边框
\documentclass[tikz, margin=3mm]{standalone}
\usepackage{siunitx}
\usetikzlibrary{positioning,calc}
\begin{document}
\begin{tikzpicture}
\draw[line width=12pt, blue]
(0,0)node[label=left:Introversion](a){} --
(8,0)node[label=right:Extroversion](b){};
\filldraw[draw=black, fill=yellow,line width=2pt, yshift=2em, xshift=14em]
(0pt,-5pt)+($(a)!.80!(b)$) rectangle (1,1);
\end{tikzpicture}
\end{document}