Die Plot-Transparenz von Pgfplots funktioniert nicht

Die Plot-Transparenz von Pgfplots funktioniert nicht

So eine Figur hätte ich am liebsten:

Bildbeschreibung hier eingeben

Aber ich habe nur das hier:

Bildbeschreibung hier eingeben

Warum hat meine Opazität nicht funktioniert? Kennen Sie mit einer TEX-Datei mit allen Koordinaten etwas, mit dem sich diese 2D-Funktionen im Zeitverlauf gut darstellen lassen?

Hier ist mein TEX-Code.

\begin{document}

\begin{tikzpicture}

\pgfplotstableread{
plot1   plot2   plot3   plot4   plot5
0       0       0       0       0
0.348081    0.187042    0.0673327    0.0784015    0.0455678
0.165143    0    0.0664995    0.0685961    0.0375407
0.17641    0.0781801    0    0    0
0.183147    0.421627    0.471163    0.367463    0.268439
0.106028    0.145975     0.185666    0.240872    0.357571
0.0164603    0.107278    0.114965    0.130172    0.170262
0.00473057    0.0598978    0.0943741    0.114495    0.120619
0       0       0       0 0
}\dummydata
\begin{axis}[
samples=30,
domain=0:1,
samples y=0, ytick={1,...,5},
zmin=0,
 area plot/.style={
      fill opacity=0.2,
      draw=none,
      fill=blue!70,
      mark=none,
      smooth
     }
   ]
\pgfplotsinvokeforeach{5,4,3,...,1}{
   \addplot3 [area plot] table [x expr=\coordindex, y expr=#1, 
 z=plot#1]
       {\dummydata};
 }

\end{axis}
\end{tikzpicture}
\end{document}

Antwort1

Ich verwende TeXLive 2016 und glaube, dass ich mit Ihrem Code genau die gewünschte Deckkraft erreicht habe:

\documentclass{memoir}

\usepackage{tikz,pgfplotstable}

\begin{document}
\begin{tikzpicture}

\pgfplotstableread{
plot1   plot2   plot3   plot4   plot5
0       0       0       0       0
0.348081    0.187042    0.0673327    0.0784015    0.0455678
0.165143    0    0.0664995    0.0685961    0.0375407
0.17641    0.0781801    0    0    0
0.183147    0.421627    0.471163    0.367463    0.268439
0.106028    0.145975     0.185666    0.240872    0.357571
0.0164603    0.107278    0.114965    0.130172    0.170262
0.00473057    0.0598978    0.0943741    0.114495    0.120619
0       0       0       0 0
}\dummydata

\begin{axis}[
    samples=30,
    domain=0:1,
    samples y=0, 
    ytick={1,...,5},
    zmin=0,
    area plot/.style={
        fill opacity=0.2,
        draw=none,
%       densely dashed, very thin,% I would consider this line or a similar line instad of draw=none
        fill=blue!70,
        mark=none,
        smooth
    }
]
\pgfplotsinvokeforeach{5,4,3,...,1}{
    \addplot3 [area plot] table [x expr=\coordindex, y expr=#1, z=plot#1]{\dummydata};
}

\end{axis}
\end{tikzpicture}
\end{document}

Dies funktioniert mit pdfLaTeX und LuaLaTeX. Bitte denken Sie daran, ein vollständiges MWE mit \documentclassallenPaketeerforderlich, sieheWas macht ein gutes MWE aus?.

AlsAlpenwasserBeachten Sie, dass Transparenz für manche Betrachter ein Problem darstellen kann.https://en.wikipedia.org/wiki/Portable_Document_Format#Transparency.

Die PostPlotten mehrerer 2D-Funktionen in einem 3D-Diagrammscheint verwandt zu sein.

Bildbeschreibung hier eingeben

verwandte Informationen