Skip to content

Instantly share code, notes, and snippets.

@nuit
Last active August 29, 2015 14:05
Show Gist options
  • Save nuit/6b0b0aae83f7f1ab19d5 to your computer and use it in GitHub Desktop.
Save nuit/6b0b0aae83f7f1ab19d5 to your computer and use it in GitHub Desktop.
scidavis linear fit, leasts squares model
import numpy as np
import pylab as pl
x1 = np.arange(15)
y1 = 0.5*x1 + 0.6
x2=[0,2,4,6,8,10,12,14]
y2=[0,2,4,4,5,5,7,8]
plot1=pl.plot(x1,y1,'r')
plot2=pl.plot(x2,y2,'go')
pl.title('Plotando y vs. x')
pl.xlabel('eixo x')
pl.ylabel('eixo y')
pl.xlim(0,15)
pl.ylim(0,15)
pl.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment