yesterday i switched to Linux and i want to write a little Python program:
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit
linie, spannung = np.genfromtxt("werte.csv", delimiter=",", unpack = True)
d = (linie -1)*6
params, covariance_matrix = np.polyfit(d, spannung, deg = 1, cov = True)
errors = np.sqrt(np.diag(covariance_matrix))
print(params, errors)
plt.plot(d, spannung)
x = np.linspace(0,50,100)
plt.plot(x,params[0]*x-params[1])
plt.show()
But unfortunately i get the error:
UserWarning: Matplotlib is currently using pgf, which is a non-GUI backend, so cannot show the figure.
I am new to Ubuntu and new to programming so I dont have a clue what that means.
Hopefully you can help me : )