Question: Using python, code a program that allows users to input x and y values, each with its individual uncertainty per each value, and outputs a

Using python, code a program that allows users to input x and y values, each with its individual uncertainty per each value, and outputs a graph.

This is what I have right now, taken from the matplotlib site:

import numpy as np import matplotlib.pyplot as plt # example data x = np.arange(0.1, 4, 0.5) y = np.exp(-x) # example variable error bar values yerr = 0.1 + 0.2*np.sqrt(x) xerr = 0.1 + yerr # First illustrate basic pyplot interface, using defaults where possible. plt.figure() plt.errorbar(x, y, xerr=0.2, yerr=0.1) plt.title("Example Graph") plt.show()

However I do not know how to edit this to allow value input and different uncertainties for each value.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!