3

I would like to use just draw from tikz package to produce a filled area between a bend and a straight line.

What I have done so far:

\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}

I have used the advice from this answer: tikz apply fill between two lines

Thank you for the attention!

unmark1
  • 469

1 Answers1

4

So, you're after this?

enter image description here

You first drew the bent line with (the equivalent of) (a) to[bend right=10] (b), so simply use the same type of path when doing the filling.

For the filling you are drawing in the opposite direction though, so use bend left instead, but with the same angle:

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

Note at the end that -- cycle has been replaced by to[bend left=10] cycle.

Torbjørn T.
  • 206,688