Splines
In general, if you want to draw a smooth line connecting or approximating data points, one way to do it is using splines.
There is a lot of information about splines on the Internet, so I will not go into details here, but only point to some interesting pages, and some code I wrote myself.
libgsl
The Gnu Scientific Library contains some functions to compute splines.

Splines that go through each data point
I like the the Steffen method, because this prevents overshoots.
Centripetal Catmullâ€“Rom spline
With a normal spline, the xvalues of the data points must be ascending. When you have to deal with not ascending xvalues, but in stead a random series of xy values which represent a bending curve, you can use a Centripetal CatmullRom spline.
Some code examples are given in the Wikipedia page, but a simple Ccode is missing. Here you find a Ccode, derived from the Python code on the Wikipedia page. The script 'doit' compiles and runs the example and calls gnuplot to visualize the result: