As by my previous question on plotting an implicit curve I've got some output. But as you can see it is not quite what it should be (apart from your browser's downscaling by a factor 2 of course.
The code used to reproduce this is (run with --shell-escape
, of course)
\begin{tikzpicture}[xscale=1,yscale=.25]
\draw plot[id=curve, raw gnuplot] function{
f(x,y) = y**2 + (x**2 - 5)*(4*x**4 - 20*x**2 + 25);
set xrange [-4:4];
set yrange [-15:15];
set view 0,0;
set isosample 1000,1000;
set size square;
set cont base;
set cntrparam levels incre 0,0.1,0;
unset surface;
splot f(x,y)
};
\end{tikzpicture}
I presume gnuplot
returns the coordinates of end points of line segments and it's up to TikZ to connect them. But the results are not quite satisfactory because Now, as the documentation on gnuplot
returns the segments in a strange order. At least, that's what I assume given the graph.raw gnuplot
is rather sparse and there are not much examples of this to be found on the Internet, certainly not with surface plots or implicit functions, I hope someone could give some pointers (or a full-fledged answer, you won't see me complaining).
EDIT: As @Yossi pointed out, the .table
file gnuplot
creates contains several parts of the curve separated by 2 new lines each. Now TikZ connects these parts but it shouldn't. We're getting there :).