Matplotlib - Export and Publication Quality
Identify the error in this code snippet:
plt.figure(figsize=6,4, dpi=150)
plt.plot([1,2,3])
plt.savefig('image.png')plt.figure(figsize=6,4, dpi=150)
plt.plot([1,2,3])
plt.savefig('image.png')figsize must be a tuple like (6,4), not two separate numbers.dpi is valid in plt.figure(), plt.plot() can take one argument, and plt.savefig() can be called after plotting.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions