import matplotlib.pyplot as plt
# Given data
voltage_supply = [12, 10, 8, 6, 4, 2, -2, -4, -6, -8, -10, -12]
voltage_set = [12, 10, 8, 6, 4, 2, -2, -4, -6, -8, -10, -12]
measured_current = [0.01222, 0.01018, 0.00815, 0.006108, 0.004071, 0.002065, -0.002034, -0.004064, -0.006096, -0.008133, -0.010175, -0.01222]
# Plotting
plt.figure(figsize=(10, 6))
plt.scatter(voltage_supply, measured_current, color='blue', label='Measured Current')
plt.plot(voltage_supply, measured_current, color='blue', linestyle='--')
# Adding labels and title
plt.xlabel('Voltage Supply (Vs)')
plt.ylabel('Measured Current (A)')
plt.title('Voltage vs. Current')
plt.legend()
plt.grid(True)
# Display the plot
plt.show()
To embed this project on your website, copy the following code and paste it into your website's HTML: