Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // code provided with inquiry
- fig1 = plt.figure()
- fig2 = plt.figure()
- fig3 = plt.figure()
- ax1 = fig1.add_subplot(1, 1, 1)
- ax2 = fig2.add_subplot(2, 1, 1)
- ax3 = fig2.add_subplot(2, 1, 2)
- sd = [ax1, ax2, ax3]
- for i in range(3):
- linreg = np.polyfit(averagepower1, LAB[i], 1)
- function = np.poly1d(linreg)
- slope, intercept, r_value, p_value, std_err = scipy.stats.linregress(averagepower1, LAB[i])
- x_value = np.linspace(0, max(averagepower1), 10)
- y_value = function(x_value)
- sd[i].plot(x_value, y_value, plotcolors[i])
- sd[i].text(x = max(averagepower1) + 1, y = np.mean(LAB[i]), s = 'Hello')
- sd[i].text(x = max(averagepower1) + 1, y = np.mean(LAB[i]) - 1, s = 'y=' + str(function) + "\nR^2 = " + str(r_value ** 2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement