不对称花括号 TikZ

不对称花括号 TikZ

如何在中绘制不对称花括号TikZ? 我有以下 MWE:

\documentclass{article}
\usepackage{tikz, pgfplots}
\begin{document}
\begin{tikzpicture}[
>=stealth,]
\draw [decorate,decoration={brace,amplitude=4pt}]
(0,2)--(0,0) node[midway, right, font=\footnotesize, xshift=2pt] {Compromise loss};
\end{tikzpicture}
\end{document}

产生

在此处输入图片描述

但是我怎样才能让“喙”下方的长度为 1/3,而上方的长度为 2/3?

答案1

您可以使用aspect按键来改变喙的位置。

修改后的代码:

\documentclass{article}
\usepackage{tikz, pgfplots}
\begin{document}
\begin{tikzpicture}[
>=stealth,]
\draw [decorate,decoration={brace,amplitude=4pt,aspect=0.67}]
(0,2)--(0,0) node[pos=0.67, right, font=\footnotesize, xshift=2pt] {Compromise loss};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容