function plot f(x) updating