tikz 使用 just draw 在直线和弯曲线之间应用填充

tikz 使用 just draw 在直线和弯曲线之间应用填充

我只想使用draw包装tikz在弯曲和直线之间产生一个填充区域。

我目前所做的:

\documentclass{article} % paper and 12pt font size

\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{intersections}

\begin{document}
\begin{tikzpicture}

\draw [thick,->](0,0) -- (0,10); 
\draw [thick,->] (0,0) -- (10,0);
    \draw  [bend angle=10, bend right]  (7.5,0) to  node [midway, above,sloped] (TextNode) {$\kappa(\pi_a,\pi_e=\pi_D)$} (1,7.5);
    \draw (3cm,8pt) node[above] 
    {\footnotesize{Regi\~ao de equil\'ibrio \'unico}};
    \draw (3cm,1pt) node[above] 
    {$\pi_e=\pi=\pi_D$};
    \draw (2.5cm,120pt) node[above] 
    {Regi\~ao de E.M.};
    \draw (2.5cm,100pt) node[above] 
    {ou $\pi_e=\pi=\pi_a$};
    \draw (2.5cm,80pt) node[above] 
    {ou $\pi_e=\pi=\pi_D$};
    \draw (3cm,240pt) node[above] 
    {Regi\~ao de equil\'ibrio \'unico};
    \draw (3cm,220pt) node[above] 
    {$\pi_e=\pi=\pi_a$};
\draw (7.5,0) -- (1,2) node [midway, above, sloped] (TextNode) {$\kappa(\pi_a,\pi_e=\pi_a)$};
\draw (1 cm,1pt) -- (1 cm,-1pt) node[anchor=north] {$\pi_G$};
\draw (7.5 cm,1pt) -- (7.5 cm,-1pt) node[anchor=north] {$\pi_D$};
\draw (5 cm,0pt) -- (5 cm,0pt) node[anchor=north] {Meta de Infla\c c\~ao $(\pi_a)$};
\draw (0 cm,150pt) -- (0 cm,150pt) node[rotate=-270,above] {$\kappa$ (tecnologia de comprometimento)};  
\draw[fill=orange!50, opacity=0.2] (7.5,0) -- (1,2) decorate[decoration=snake] {  -- (1,7.5)  } -- cycle;
\node[draw,align=left] at (8,8) {$\kappa(\pi_a,\pi_e)$ \'e o \\ compromentimento tecnol\'ogico\\ m\'inimo necess\'ario \\ para que a meta\\ seja atingida};

\end{tikzpicture}
\end{document}

我已使用这个答案的建议:tikz 在两条线之间应用填充

谢谢您的关注!

答案1

那么,你在追寻这个吗?

在此处输入图片描述

您首先用 (相当于) 绘制弯曲的线条(a) to[bend right=10] (b),因此在进行填充时只需使用相同类型的路径。

但是,对于填充,您要沿相反的方向绘制,因此请使用bend left相同的角度:

\draw[fill=orange!50, opacity=0.2] (7.5,0) -- (1,2) decorate[decoration=snake] {  -- (1,7.5)  } to[bend left=10] cycle;

请注意,末尾的-- cycle已被替换为to[bend left=10] cycle

相关内容