How to fill the intersection among four curves?

by Di Miao   Last Updated May 04, 2018 18:23 PM

In my problem, all curves are plot from data instead of explicit function. And what I want to do is to fill those little curved rectangles with different colors. How could I do it?

enter image description here

Here is the tex for generate this figure.

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{plotmarks}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{filecontents}
\pgfplotsset{compat=newest}



\begin{document}
\begin{tikzpicture}[scale = 5]
 \begin{axis}[hide axis, axis equal, view={0}{90}]

    \foreach \f in {1,2,...,4}{\addplot[mark=none, color = blue,thick, smooth, line cap=round] table [] {curvpts_\f_u.txt};}
    \foreach \f in {1,2,...,4}{\addplot[mark=none, color = blue, thick, smooth, line cap=round] table [] {curvpts_\f_v.txt};}

 \end{axis} 
\end{tikzpicture}
\end{document}

Here are the data files.



Related Questions


Plot functions and their point of intersection

Updated April 07, 2018 05:23 AM

Clipping more complicated shapes in TikZ

Updated December 31, 2017 05:23 AM

Eraser tool for TikZ

Updated September 01, 2018 22:23 PM

Clipping at node – making a pattern

Updated July 07, 2018 17:23 PM