[Tex/LaTex] ny way to remove mesh lines completely in a pgfplots faceted 3d plot

3dgridspgfplots

I can not seem to find the way to remove the lines in the surface mesh in a 3d faceted plot. I need a solution that does not use the "shader=interp" (i.e. gradient filling) so that the faces are constant in color.

For example the following code generates white lines in Acrobat (see at the end). I tried all sorts of tricks, such as "faceted color = none, draw opacity=0., line width=0., draw=none". I made the surface semitransparent so the effect is evident.

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot3[surf, opacity=0.8, shader=faceted, faceted color = none, draw opacity=0., line width=0.,draw=none] %shader interp offends lualatex
coordinates {
(-3, -3, 3.57005)(-2.8125, -3, 3.50682)(-2.625, -3, 3.4438)\par
(-3, -2.8125, 3.5075)(-2.8125, -2.8125, 3.44005)(-2.625, -2.8125, 3.37252)\par
(-3, -2.625, 3.4453)(-2.8125, -2.625, 3.37336)(-2.625, -2.625, 3.301)\par
(-3, -2.4375, 3.38377)(-2.8125, -2.4375, 3.3071)(-2.625, -2.4375, 3.22959)\par
}; 
\end{axis}
\end{tikzpicture}
\end{document}

Look at the white lines:

whitelines as mesh

(Is this perhaps a bug in Acrobat?, evince shows the desired result for example)

EDIT: one of the comments states that flat should give a flat color and no lines around the patches. The result with

\addplot3[surf, opacity=0.8, shader=flat]

is that lines still appear in the borders, here with Acrobat and evince

Acrobat flat
evince flat

Best Answer

The problem is the combination between the chosen shader=flat and opacity: deactivate opacity and you do not see any edges.

Internally, the shader draws surface segments "on top of each other". It simply paints them (with fill and stroke). But since adjacent surface segments share edges, these edges are used twice for the opacity computation, resulting in different colors.

I believe this is inherent to shader=flat, there is no simple solution here (except fooling around with different fill opacity and draw opacity perhaps).