Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. def graph(): #График
  2. from matplotlib import pyplot as plt
  3. global start, end, step, eps
  4. xlist = np.linspace(start.get(), end.get(), 10000, dtype = float)
  5. ylist = []
  6. xlist1 = []
  7. for x in xlist:
  8. if fabs(f2(x)) <= 1e-3:
  9. ylist.append(f1(x))
  10. xlist1.append(x)
  11. plt.plot(xlist, [f1(x) for x in xlist])
  12. plt.plot(xlist1,ylist, "rs")
  13. plt.plot(xlist, np.zeros(10000, dtype = float), color = 'red')
  14. plt.grid(b = True)
  15. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement