Add fitPlotWithPoints function