I graph of weather data from a CGI script using the Agg backend only. The graph
is a common time vs. temperature 2D line plot. Since the graph plots
every n minutes, the lines on the graph tend to look pointed and not very
aesthetically pleasing (as many people have informed me.)
I did some research and found I needed to do curve fitting.
I'm trying to use 8th order polynomial fitting. I have found a sample on the
Web that shows how to use matplotlib to do a best-fit line from polyfit, but
I want a curve that follows the curve of weather temperature data.
I plot the data using a list of X-coordinates and a list of Y-coordinates.
I assume I can call polyfit with (x,y,8) for 8th order polynomial fitting.
However, I am not sure what to do with the results. I have tried to
translate the 1st order polyfit example for my needs but I don't think
I am using the polyfit data correctly.
Also, it has been suggested that a spline or Butterworth filter on the data
may yield more predictable results. I have found some of this functionality
in SciPy and a nifty module in a language called Octave. Would matplotlib
benefit from this?
Any assistance is much appreciated. I'm just starting out on this type of stuff
but it is fascinating to work with!