用 TiKz 绘制多条线条会使背景变暗吗?

用 TiKz 绘制多条线条会使背景变暗吗?

当我用 TiKz 绘制多条线时,我的 tikzpicture 的背景会变暗(即从白色变为浅灰色)。有趣的是,我画的线越多,白色就越暗。这是我的 tikzpicture 的代码:

\begin{figure}[h]
\centering
\subfloat[(Linear) random effect model]
    {
    \begin{tikzpicture}[xscale=.5,yscale=.5]
        \tikzstyle{every node}=[font=\footnotesize]
        \draw [-] (0,10) -- (0,0) -- (10,0);
        \draw [fill=white,-,thick] (0,0) -- (10,9.9);
        \draw [fill=white,-,thick] (0,0) -- (10,9.8);
        \draw [fill=white,-,thick] (0,0) -- (10,9.6);
        \draw [fill=white,-,thick] (0,0) -- (10,9.2);
        \draw [fill=white,-,thick] (0,0) -- (10,8.6);
        \draw [fill=white,-,thick] (0,0) -- (10,8.4);
        \draw [fill=white,-,thick] (0,0) -- (10,8.2);
        \draw [fill=white,-,thick] (0,0) -- (10,8.0);
        \draw [fill=white,-,thick] (0,0) -- (10,8.2);
        \draw [fill=white,-,thick] (0,0) -- (10,7.8);
        \draw [fill=white,-,thick] (0,0) -- (10,7.5);
        \draw [fill=white,-,thick] (0,0) -- (10,6.4);
        \draw [fill=white,-,thick] (0,0) -- (10,6.0);
        \draw [fill=white,-,thick] (0,0) -- (10,5.5);
        \node [above left,text badly centered,text width=20mm] at (5,5) {Unit-to-unit variation};
    \end{tikzpicture}
    }
~~
\subfloat[Stochastic process model]
    {
    \begin{tikzpicture}[xscale=.5,yscale=.5]
        \tikzstyle{every node}=[font=\footnotesize]
        \draw [-] (0,10) -- (0,0) -- (10,0);
        \draw [thick] (0,0) -| (0.1,0.8) -| (1.0,1.2) -| (1.5,1.6) -| (3.0,2.2) -| (4.0,2.4) -| (4.8,3.0) -| (5.2,3.5) -| (6,3.8) -| (6.5,4.8) -| (6.9,5.2) -| (7.5,7.0) -| (8.0,7.4) -| (8.8,7.8) -| (9.0,8.1) -| (9.2,8.2) -| (9.5,9.0) -- (10,9.0);
        \node [above left,text badly centered,text width=20mm] at (5,5) {Time-dependent variation};
    \end{tikzpicture}
    }
\caption{Caption}
\label{fig:label}
\end{figure}

然后这就是结果(注意白色的背景是如何变暗的):

相关内容