Informatics Practices

Which of the following is an incorrect example of savefig() function?

  1. plt.savefig("bar1.pdf" )
  2. plt.savefig("bar1.png")
  3. plt.savefig("bar1.eps")
  4. plt.savefig("bar1.ppt")

PyPlot

2 Likes

Answer

plt.savefig("bar1.ppt")

Reason — The savefig() function in matplotlib is used to save a figure to a file. It supports various file formats such as PDF, PNG, EPS, SVG, etc. However, PPT (PowerPoint) is not a supported file format for saving figures in matplotlib.

Answered By

3 Likes


Related Questions