Whether we could draw a curve that best fitting the given points that has coordinates by juce?

Hi,
I have a problem.Whether we could draw a curve that best fitting the given points that has coordinates by juce?

line