Re: Line of best fit

2014-03-31 Thread Steven D'Aprano
On Mon, 31 Mar 2014 04:29:15 -0700, Jamie Mitchell wrote: > I am new to python so apologies for the ignorance with this question. > > How would I apply a line of best fit to a plot? That depends on what software you are using to generate the plot. I see you have this line of code: &

Re: Line of best fit

2014-03-31 Thread Sturla Molden
Roy Smith wrote: > Please tell us more about the environment you're working in. I'm > guessing from the fact that you're calling plt.plot(), that you've > already got some add-on modules loaded. Pandas, maybe? Probably matplotlib.pyplot -- https://mail.python.org/mailman/listinfo/python-li

Re: Line of best fit

2014-03-31 Thread Moritz Beber
://statsmodels.sourceforge.net/devel/examples/notebooks/generated/ols.html On Mon, Mar 31, 2014 at 1:29 PM, Jamie Mitchell wrote: > I am new to python so apologies for the ignorance with this question. > > How would I apply a line of best fit to a plot? > > My data are netCDF4 data files and this is essentia

Re: Line of best fit

2014-03-31 Thread Roy Smith
In article <0fb15100-15e8-46d6-a38f-b187c7012...@googlegroups.com>, Jamie Mitchell wrote: > I am new to python so apologies for the ignorance with this question. > > How would I apply a line of best fit to a plot? Python has nothing built-in which does that, but there are pl

Line of best fit

2014-03-31 Thread Jamie Mitchell
I am new to python so apologies for the ignorance with this question. How would I apply a line of best fit to a plot? My data are netCDF4 data files and this is essentially what I have done so far: swh1=netCDF4.Dataset('filename','r') hs1=swh1.variables['hs'] swh2