Here is an explanation of the code:
- plot_errorbar() is a user-defined function to plot the error graph with the given parameters such as axes, data to be plotted, and other parameters that control the plot.
- gs1 = GridSpec(3, 1) defines a 3 x 1 grid, gs1.
- plot_errorbar() plots the error bar on axes gs1[0] with constant error on both the x and y axis:
- The length of the horizontal line in the plot indicates the magnitude of error in X.
- The length of the vertical line represents the magnitude of error in Y.
- In the first plot, both of them look the same size, but their values are quite different, at 0.8 and 0.3. That is because the scale on the x and y axis are different. If we want to get them onto the same scale, we should ...