1

Is there a way to tell pgfplots not to render the parts of a 3d graph that are overwritten?

Here is a minimal example

\documentclass{standalone}

% pgfplots \usepackage{pgfplots}

\pgfplotsset{ compat = newest, width = 10cm, % width height = 7cm, % height samples = 20, }

\begin{document} \begin{tikzpicture} \begin{axis}[hide axis]

    \addplot3 [
        % Aparence
        surf,
        opacity=0.5,
        fill opacity= 1,
        faceted color = white,
        shader=faceted interp,
        % Scope
        data cs = cart, % cart/polar/polarrad
        % Variable
        domain   = -1:1,
        domain y = -1:1,
    ]{
        x^2-y^2
    };

\end{axis}

\end{tikzpicture} \begin{tikzpicture} \begin{axis}[hide axis]

    \addplot3 [
        % Aparence
        surf,
        opacity=0.5,
        fill opacity= 1,
        faceted color = white,
        shader=faceted interp,
        % Scope
        data cs = cart, % cart/polar/polarrad
        % Variable
        variable   = u,
        variable y = v,
        domain   = 0:360,
        domain y = -180:0,
    ]
    (
        {cos(u)*sin(v)}, 
        {sin(u)*sin(v)}, 
        {cos(v)}
    );

\end{axis}

\end{tikzpicture} \end{document}

that yields: Generated pdf

it is possible to see that everything that is overwritten is rendered, slowing down the compilation process, is there any way to optimise this?


Update 2

Opened an issue with problems related to the implementation of external library here

Felipe9
  • 309

0 Answers0