# surf plot: wrongly connected mesh vertices

I have troubles with resembling a matlab surface plot in pgfplots. Here is my MWE:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\begin{document}
\tikz{
\begin{axis}[view={0}{90}]%
surf,
z buffer=sort,
mesh/cols=50,
mesh/rows=50,
point meta=\thisrow{c},
draw=none,
domain=0:10
]
table[col sep=comma] {data.dat};
\end{axis}
}
\end{document}


with the test data being uploaded here: https://gist.github.com/bonanza123/e9a696bc0e9c727180d34046d9abbc90

The code above gives me this output:

To me, it looks like the vertices in the mesh vertices are not connected correctly. But how to fix that?

While I want something like this:

The matlab plot and the data linked above is generated as per:

surface(X,Y,Z,'EdgeColor','interp','FaceColor','interp');
data = struct2table( struct( 'x', X, 'y', Y, 'c', Z ) );
writetable( data, 'data.dat' );


The problem is due to the nans which require: unbounded coords=jump.