Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python regeression line

x = np.array([1, 2, 3, 4])
y = np.array([ 2, 8, 3, 6 ])

plt.plot(x, y, 'o')

m, b = np.polyfit(x, y, 1)
plt.plot(x, m*x + b)
Comment

PREVIOUS NEXT
Code Example
Python :: how to overlap two barplots in seaborn 
Python :: numpy argsort 
Python :: make button in tk 
Python :: empty list check in python 
Python :: python responses 
Python :: if statement python explained 
Python :: count in python 
Python :: run python module from command line 
Python :: python capture stdout 
Python :: anonymous function python 
Python :: negative slicing in python 
Python :: How to use Counter() Function 
Python :: change part of a text file python 
Python :: time a function python 
Python :: python power of natural number 
Python :: how to import data in python 
Python :: check if a value is in index pandas dataframe 
Python :: how to do more than or less than as a condition in pythonb 
Python :: python print not working 
Python :: getting current user in django 
Python :: delete multiple dataframes at once in python 
Python :: pandas save dataframe with list 
Python :: set intersection 
Python :: manytomany django add bulk create 
Python :: python language 
Python :: sparse matrix multiplication in python 
Python :: python string: .upper() 
Python :: convert images to jpeg 
Python :: tuple vs set python 
Python :: doing some math in python 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =