I am not going to reverse engineer your code, but it looks like your
writing your own least-squares fitting algorithm and doing some simple
plots. Also, from your many posts last days, it looks like you are a
newbie struggling with a python interface to gnuplot.
May I suggest that you have a look
Got the problem solved finally. Missed out theses two lines:
plot1 = Gnuplot.PlotItems.Data(original, title="Original")
plot2 = Gnuplot.PlotItems.Data(expected, title="Expected")
plot3 = Gnuplot.PlotItems.Data(actual, title="Acutal")
plot4 = Gnuplot.PlotItems.Func('%f * x+%f'%(bf1[
[EMAIL PROTECTED] wrote:
>> > Still confused though i get the instance part ur trying to tell me.
> Tried that out too. No error however, best fit lines still not being
> made on the graph. Only the 3 plot lines show up.
Gave it another shot. You might want something like
from __future__ import
[EMAIL PROTECTED] wrote:
> Tried that out too. No error however, best fit lines still not being
> made on the graph. Only the 3 plot lines show up.
Sorry, I don't know gnuplot, so I can't help you with any but the obvious
(read: Python) errors.
Peter
--
http://mail.python.org/mailman/listinfo/py
On Jun 13, 12:13 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Umm Tried this out too Laiken heres the error that this
> > gives..
>
> > Traceback (most recent call last):
> > File "D:\Questions\Gradient and C\Gnuplot\Combining Best fit and
> > Plotting\combasd
[EMAIL PROTECTED] wrote:
> Umm Tried this out too Laiken heres the error that this
> gives..
>
> Traceback (most recent call last):
> File "D:\Questions\Gradient and C\Gnuplot\Combining Best fit and
> Plotting\combasd.py", line 3, in
> combine.show_plots([(2,3), (4,8), (5,9), (6,2)
Umm Tried this out too Laiken heres the error that this
gives..
Traceback (most recent call last):
File "D:\Questions\Gradient and C\Gnuplot\Combining Best fit and
Plotting\combasd.py", line 3, in
combine.show_plots([(2,3), (4,8), (5,9), (6,2)], [(1,7), (3,3),
(4,5), (5,6)], [(1,3),
[EMAIL PROTECTED] wrote:
> Hello. Ive got two functions here. Somehow the program does not go in
> to the second function wehn i call it. The bestfit function. Could
> some1 help me identify the problem. Heres the code:
Same problem as before, you have to keep the Gnuplot instance alive if you
wa
Hello. Ive got two functions here. Somehow the program does not go in
to the second function wehn i call it. The bestfit function. Could
some1 help me identify the problem. Heres the code:
import Gnuplot
def bestfit(uinput):
if not isinstance(uinput, list):
return False
else: