0

enter image description here

You can see I am using ax.plot but nothing happened.

Michael S.
  • 3,050
  • 4
  • 19
  • 34
WXC
  • 1

1 Answers1

0

Just call plt.show() when you've run all of your graph creation code:

import numpy as np
import matplotlib.pyplot as plt
x= np.arange(-10, 10, 0.1)
fig, ax = plt.subplots()
ax.plot(x, np.cos(x))
plt.show()

enter image description here

Michael S.
  • 3,050
  • 4
  • 19
  • 34