0

Related to this question, my code:

\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}

gave:

enter image description here

on one computer but fails on another one giving the message:

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

I reinstalled Lyx and Texlive in the second computer but it returns the same.

What is happening?

Thank you.

PS: My preamble is:

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

I am working on Lyx but the code above is given inside a Latex frame (Control+L).

  • 2
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Stefan Pinnow Feb 18 at 10:54
  • 1
    Without a full MWE my guess is, that you haven't written \usepgfplotslibrary{fillbetween} but somewhere a typo ... – Stefan Pinnow Feb 18 at 10:55
  • 2
    Sorry, but combining the codes to an MWE works as expected. Thus, this is most likely a problem with your TeX installation -- as you have already guessed yourself. But with that I cannot help you. Good luck! – Stefan Pinnow Feb 18 at 11:08
  • Thank you for the attempt. Which could be the appropriate forum where solving this? – gibarian Feb 19 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.