I want to draw this equation in LaTeX using tikz (maybe with pgfplots):
(x^2+y^2) + \frac{0.7}{\sqrt((x-0.3)^2+y^2)} + \frac{0.3}{\sqrt((x+0.7)^2+y^2)} = 2.5
I tried gnuplot:
\begin{tikzpicture}
\draw plot[raw gnuplot] function{
f(x,y) = (x**2+y**2) + 0.7/(sqrt((x-0.3)**2+y**2)) + 0.3/(sqrt((x+0.7)**2+y**2)) - 1.5;
set xrange [-4:4];
set yrange [-4:4];
set view 0,0;
set isosample 1000, 1000;
set sample 1000, 1000;
set size square;
set contour base;
set cntrparam levels incre 0,0.1,0;
unset surface;
splot f(x,y);
};
\end{tikzpicture}
I need to turn on -shell-escape:
How to enable `shell escape' (or `write18') - Visual Studio Code (Latex Workshop extension)
On the other hand, I tried pst-func but it failed to plot my function.
I am also willing to find any solution without gnuplot as I do not want to install a new software for one chart


gnuplot? – Firestar-Reimu Aug 10 '22 at 15:21