2

I have in my preamble:

\pgfplotsset{
        compat=newest,
        /pgf/declare function={
            g(\x) = -x^4+2*x^3-x-2;
        },
    }

and then later in the body I have a plot of the function g(x). I would like to be able to reference g(x) outside of a pgfplots environment, and have it show up as the defined expression.

Something like $g(x)=\pgfdisplay{g(\x)}$ and have it render the same way $g(x)=-x^4+2*x^3-x-2$ would render.

Ben Lewis
  • 21
  • 1

0 Answers0