2

I am drawing two very simple curves with TikZ. Here's my code:

\documentclass[border=1cm]{standalone}

\usepackage{tikz} \usetikzlibrary{arrows,arrows.meta}

\begin{document} \begin{tikzpicture}[font=\normalsize]

\draw [very thick,-Triangle] (-0.02,0) -- (10,0); % X-axis \draw [very thick,-Triangle] (0,0) -- (0,5); % Y-axis

\draw [very thick] (0,0) to[out=25,in=-230] (2,3) to[out=-50,in=180] (4,0); \draw [very thick] (2,0) to[out=0,in=-180] (4,1.5) to[out=0,in=90] (5,0);

\end{tikzpicture} \end{document}

Here's the result: enter image description here

What's the simplest way to fill in the area below the curves as shown in my mockup?

enter image description here

Ingmar
  • 6,690
  • 5
  • 26
  • 47
  • Browsing through the other answers really didn't help much (and I did search before asking), but I'll just try again. Thanks, I guess? – Ingmar Aug 17 '21 at 08:01
  • 1
    With those curves, the only one that needs anything extra is the purple region. I would fill the left-hand curve fully in blue, the right-hand fully in red, and then use clipping to fill the central region in purple: \begin{scope} \clip <left-hand page>; \fill[purple] <right-hand path>; \end{scope}. Also, remember to do all of the filling before drawing. – Andrew Stacey Aug 17 '21 at 08:33

0 Answers0