I have a problem with plotting through matplotlib.
When I try to plot with this code works well:
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1)
ax.plot(10)
plt.show()
But when I try this one, doesn't work:
import matplotlib.pyplot as plt
fig = plt.Figure()
ax = fig.add_subplot(111)
ax.plot(10)
plt.show()
Does someone know why this happens?
My matplotlib version is 3.3.4
Many thanks.