So I managed to get this far with the knowledge I have of tikz and 3dplot and pgfplots :
\documentclass[11pt, oneside]{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{pgfplots}
\usepgfplotslibrary{colorbrewer,patchplots}
\pgfplotsset{width=8cm,compat=1.14}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
domain = -3:3,
y domain = -2:2,
view = {0}{90},
colormap={violet}{rgb=(0.3,0.06,0.5), rgb=(0.9,0.9,0.85)},
point meta max=5,
point meta min=-5,
]
\addplot3[
contour filled={number = 100,labels={false}},
]{(\x)^2 - 4*(\y)^2};
\draw (0,-2) -- (0,2) node[left,yshift=-.2cm]{$y$};
\draw (-3,0) -- (3,0) node[below,xshift=-.2cm]{$x$};
\draw[color=gray!60!black,dashed] (-2,2) -- (2,-2);
\draw[color=gray!60!black,dashed] (-2,-2) -- (2,2);
\end{axis}
\end{tikzpicture}
\end{document}
Now to make it perfect, I would only need to add the lines to show the contour of the graph, more specifically the likes of x^2 – 4*y^2 = 1 and x^2 – 4*y^2 = 2. Now this is where I am stuck and don't know how to do it. It should look something like this though :
Any help on this would be greatly appreciated and thanks in advance, also if I'm using the wrong tools to do what I want, you can always point me in the right direction.
P.S. I know the last picture looks odd, but I drew the lines in to show what it should resemble, though I would like it to represent the equations given above.
Best Answer
So this is what you are searching for? For details, please have a look at the comments in the code.