[text] графік

Viewer

copydownloadembedprintName: графік
  1. import matplotlib.pyplot as plt
  2.  
  3. # Задані значення x та y
  4. x_values = [-2, -1, 0, 1, 2]
  5. y_values = [1.38, 1.01, 0.64, 0.27, -0.1]
  6.  
  7. # Побудова графіку
  8. plt.plot(x_values, y_values, marker='o', linestyle='-')
  9. plt.title('Графік функції $y = -0.37x + 0.64$')
  10. plt.xlabel('x')
  11. plt.ylabel('y')
  12. plt.grid(True)
  13. plt.show()

Editor

You can edit this paste and save as new:


File Description
  • графік
  • Paste Code
  • 02 May-2024
  • 366 Bytes
You can Share it: