This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
plt.style.use('seaborn') # I personally prefer seaborn for the graph style, but you may choose whichever you want. | |
params = {"ytick.color" : "black", | |
"xtick.color" : "black", | |
"axes.labelcolor" : "black", | |
"axes.edgecolor" : "black", | |
"text.usetex" : True, | |
"font.family" : "serif", | |
"font.serif" : ["Computer Modern Serif"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#reproduces the "stats" or "verbose" output from LINEST in Excel or Google Sheets | |
import numpy as np | |
data = np.genfromtxt('data.csv', delimiter=',', names=True) | |
x = data['x'] | |
y = data['y'] | |
n = len(y) | |
dofreedom = n-2 |