Started plotting function