[Tex/LaTex] Draw tikz plot with dashed and curved lines

pgfplotstikz-pgf

I would like some help to get this plot:

enter image description here

Here is what I have so far:

\documentclass{article}
\usepackage{tikz,pgfplots}
\usepgfplotslibrary{groupplots}
\pgfplotsset{compat=newest}
\usepackage{filecontents}

\begin{filecontents*}{data.csv}
x y
-4, 5.1
-3.95, 5
-3.95, 4.9
-3.95, 1
-3, 0.5
-3, -1.5
-2, -0.75
0.25, -0.75
1, -1
1.2, -0.75
1.5, -1
3, -0.25
\end{filecontents*}

\begin{filecontents*}{data2.csv}
x y
-4, 0.5
-3.95, 3
-2, 4
-1.5, 0.5
-0.5, 3.2
-0.7, -0.25
0.2, 0.1
0.3, -0.75
0.3, -1.85
0.45, 1
1.2, -0.75
1.35, -1.8
\end{filecontents*}

\begin{document}
\begin{tikzpicture}
  \begin{groupplot}[group style={group size=2 by 1},
%    ->=latex,
    xmin=-5.5,
    xmax=5.5,
    ymin=-6.5,
    ymax=6.5,
    height=4cm,
    width=5cm,
    xlabel={$x$},
    ylabel={$y$},
 %   xlabel style={below right},
 %   ylabel style={above left}
    ]
\nextgroupplot
\addplot [only marks,mark=x,red,mark options={scale=1}]table[x index=0,y index=1,col sep=comma, green, only marks] {data.csv};
\nextgroupplot
\addplot [only marks,mark=x,red,mark options={scale=1}]table[x index=0,y index=1,col sep=comma, green, only marks] {data2.csv};
\end{groupplot}
\end{tikzpicture}

\end{document}

Best Answer

An approximation using some plots, some fine tuning might be desirable. I haven't added the arrow between the axes and some other stuff.

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{arrows.meta}
\usepgfplotslibrary{groupplots}
\pgfplotsset{compat=1.14}
\usepackage{filecontents}

\begin{filecontents*}{data.csv}
x y
-4, 5.1
-3.95, 5
-3.95, 4.9
-3.95, 1
-3, 0.5
-3, -1.5
-2, -0.75
0.25, -0.75
1, -1
1.2, -0.75
1.5, -1
3, -0.25
\end{filecontents*}

\begin{filecontents*}{data2.csv}
x y
-4, 0.5
-3.95, 3
-2, 4
-1.5, 0.5
-0.5, 3.2
-0.7, -0.25
0.2, 0.1
0.3, -0.75
0.3, -1.85
0.45, 1
1.2, -0.75
1.35, -1.8
\end{filecontents*}

\begin{document}
\begin{tikzpicture}
  \begin{groupplot}[group style={group size=2 by 1},
    xticklabels={},yticklabels={},
%    ->=latex,
    xmin=-5.5,
    xmax=5.5,
    ymin=-6.5,
    ymax=6.5,
    height=4cm,
    width=5cm,
    xlabel={$x$},
    ylabel={$y$},
 %   xlabel style={below right},
 %   ylabel style={above left}
    axis lines=center,axis equal,clip=false %%%% <---- Added
    ]
\nextgroupplot
\addplot [only marks,mark=x,red,mark options={scale=1}]table[x index=0,y index=1,col sep=comma, green, only marks] {data.csv};

\pgfplotsinvokeforeach{0,...,4}{
\addplot [xshift=#1*0.1cm,yshift=0.5cm-0.1*#1cm,red,thin,dotted,domain=-9+#1:0+#1,rotate around={10+20*#1:(axis cs:-3.5+#1,0)}] {((x+5-2*#1)/4)^2};
}

\nextgroupplot
\pgfplotsinvokeforeach{-2,-1,...,2}{
\addplot [thin,dotted,red,domain=-5-#1:5-#1] {x + 3*#1};
}
\addplot [-Stealth,thick,black,domain=-4:4] {-x};
\addplot [only marks,mark=x,red,mark options={scale=1}]table[x index=0,y index=1,col sep=comma, green, only marks] {data2.csv};
\end{groupplot}
\end{tikzpicture}

\end{document}