What is the correct way to plot an implicit function using pgfplots? Consider the following example:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot+[mark=none] function[raw gnuplot] {
set contour base;
set cntrparam levels discrete 0.0;
unset surface;
set view map;
set isosamples 500;
splot exp(x)*cos(y)-1-x;
};
\end{axis}
\end{tikzpicture}
\end{document}
This is what the function looks like in gnuplot:

pgfplots, however, connects function's segments, which is unexpected:


empty lineoption that can be set tojumpto get the desired behaviour. If you're using TeXLive, you can update PGFPlots throughtlmgrby temporarily using the repositoryhttp://tlcontrib.metatex.org/2010. – Jake May 16 '11 at 16:41empty lineoption to allow interrupted plots works very well except gaps between segments become visible: http://i.imgur.com/8k3pp.png. Is there a way to fix this? – caustic May 16 '11 at 20:28thickand plot the contour for 0.003 instead of 0.0, it looks okay. – Jake May 16 '11 at 20:59