Feb-02-2020, 11:21 AM
Hello folks,
I have a physics report to write up and graphs need to be digitally produced. How do I add a line of best for the data below (the data points match the forward bias characteristic for a silicon diode - i.e. exponential curve):
I have a physics report to write up and graphs need to be digitally produced. How do I add a line of best for the data below (the data points match the forward bias characteristic for a silicon diode - i.e. exponential curve):
import numpy as np import matplotlib.pyplot as plt plt.figure("Forward Bias Characteristic") x = np.array([0.00, 0.53, 0.55, 0.57, 0.59, 0.61, 0.63, 0.65, 0.67, 0.69]) y = np.array([0.0, 0.0, 0.1, 0.2, 0.5, 1.0, 1.2, 2.3, 3.5, 5.4]) yerror = np.array([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1,]) plt.plot(x, y, 'rx') plt.xlabel('$Volatge (V)$') plt.ylabel('$Current (mA)$')