plot_fn function

Plot user-defined function