How could Python be used to find the area between the line y = x and the plotted points. Is there a well-known module with this functionality, or what is a simple solution?
import matplotlib.pyplot as plt
import numpy as np
x = ([[0. ],[0.00862069],[0.03448276],[0.03448276],[0.06896552],
[0.0862069 ],[0.09482759],[0.09482759],[0.11206897],[0.11206897],
[0.15517241],[0.15517241],[0.1637931 ],[0.1637931 ],[0.20689655],
[0.20689655],[0.24137931],[0.25862069],[0.30172414],[0.3362069 ],
[0.37068966],[0.37068966],[0.45689655],[0.47413793],[0.5 ],
[0.53448276],[0.56034483],[0.67241379],[0.68965517],[0.75862069],
[0.77586207],[0.81034483],[0.82758621],[0.86206897],[0.87931034],
[0.9137931 ],[0.9137931 ],[0.93965517],[0.93965517],[0.95689655],
[0.96551724],[0.97413793],[0.97413793],[0.98275862],[0.98275862],
[0.99137931],[0.99137931],[1. ],[1. ]])
y = ([[0. ],[0. ],[0. ],[0.26315789],[0.26315789],[0.26315789],
[0.26315789],[0.31578947],[0.31578947],[0.42105263],[0.42105263],[0.47368421],
[0.47368421],[0.52631579],[0.52631579],[0.57894737],[0.57894737],[0.57894737],
[0.57894737],[0.57894737],[0.57894737],[0.63157895],[0.63157895],[0.63157895],
[0.63157895],[0.63157895],[0.63157895],[0.63157895],[0.63157895],[0.63157895],
[0.63157895],[0.63157895],[0.63157895],[0.63157895],[0.63157895],[0.63157895],
[0.68421053],[0.68421053],[0.73684211],[0.73684211],[0.78947368],[0.78947368],
[0.84210526],[0.84210526],[0.89473684],[0.89473684],[0.94736842],[0.94736842],
[1. ]])
plt.title('Find the Area between the line and the green connected points', fontsize=14)
plt.plot(x, y, 'green')
plt.legend(loc='lower right', fontsize=18)
plt.plot([0,1],[0,1])
plt.xlim([0,1])
plt.ylim([0,1.05])
plt.ylabel('y-axis', fontsize=16)
plt.xlabel('x-axis', fontsize=16)