Tokeshi F>f function, fixed plotting and simplified the function