Explain the difference between `plt.show()` and `plt.savefig()` in Matplotlib.
Example:
plt.plot([1, 2, 3, 4], [10, 20, 25, 30])
plt.savefig('plot.png')
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.