Search code examples
mathgraphgnuplot

Gnuplot - function


Why this graph doesn't go through [0,0]?

Why is f(0) = 5?

enter image description here


Solution

  • In gnuplot, the / operator with integer operands does integer division, like Python's // operator. So your 5/3 exponent evaluates simply to 1, and likewise 2/3 is 0.

    If you want a fractional answer, use floating-point arguments:

    f(x)=2*x**(5.0/3.0) + 5*x**(2.0/3.0)