Skip to content

faceted color=none has no effect if fill or opacity is used in surface plots #495

@FranzAtGithub

Description

@FranzAtGithub

Hi there,

I feel like faceted color=none is broken in some situations.

Consider the code:

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}


\begin{document}

\begin{tikzpicture}
    \begin{axis}

        % faceted color=none has no effect
        \addplot3 [
        domain y=0:2,
        domain=-2:2,
        surf,
        faceted color=none,
        fill=pink,
        opacity=0.2,
        samples y=20,
        samples=20,
        ] {0};

        % no use of faceted color
        % color is based on "function value"
        \addplot3 [
        domain y=0:2,
        domain=-2:2,
        surf,
        fill=pink,
        opacity=0.2,
        samples y=20,
        samples=20,
        ] {2};

        % removing only opacity
        % faceted color=none has no effect
        \addplot3 [
        domain y=0:2,
        domain=-2:2,
        surf,
        faceted color=none,
        fill=pink,
        samples y=20,
        samples=20,
        ] {4};

        % removing only fill
        % faceted color=none has no effect
        \addplot3 [
        domain y=0:2,
        domain=-2:2,
        surf,
        faceted color=none,
        opacity=0.2,
        samples y=20,
        samples=20,
        ] {6};

        % removing opacity and fill
        % only here does faceted color=none work
        \addplot3 [
        domain y=0:2,
        domain=-2:2,
        surf,
        faceted color=none,
        samples y=20,
        samples=20,
        ] {8};

    \end{axis}
\end{tikzpicture}

\end{document}

The option faceted color=none seems only to work when the options fill and opacity are not used.
Is there a work-around that I could use?

There is a related post on tex.stackexchange about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions