使用 tikzpicture 時出現填滿問題

使用 tikzpicture 時出現填滿問題

相關問題,我的程式碼:

\begin{tikzpicture} 
\begin{axis}

[domain=0:12, samples=100,grid=major,     
domain=1:4, xlabel=$\lambda$, ylabel=$f$, legend pos=north west, no marks] 

\addplot [red,fill=orange!70]    {(0.1)*x^8+x^3/3+(0.1)*x^2+5/3}; 

\addplot [blue,name path=A] {(0.1)*x^8-x^6-(0.3)*x^2-1}; 

\addplot+[name path=B] {0};     

\addplot+[gray] fill between[of=A and B,{domain=1:4}];

\legend{$f_1$, $f_2$} 
\end{axis} 
\end{tikzpicture}

給了:

在此輸入影像描述

在一台計算機上但在另一台計算機上失敗並給出訊息:

I can't find 'usepgfplotslibrarypgfplot.fillbetween.code.tex'.

我在第二台電腦上重新安裝了 Lyx 和 Texlive,但它會返回相同的結果。

怎麼了?

謝謝。

PS:我的序文是:

\usepackage{pgfplots}
\usetikzlibrary{positioning}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{fillbetween}

我正在 Lyx 上工作,但上面的程式碼是在 Latex 框架內給出的(Control+L)。

相關內容