Here's yet another approach using SciPy and matplotlib for plotting: http://www.scipy.org/Cookbook/LinearRegression Probably doesn't meet your 'Basic' requirement, though.