2

I plotted something in python and I want to save the plot using plt.savefig("g3.19e10.01024"). But it doesn't let me, as the program sees the .19e10 as an extension which is not recognized by the system. How can I solve this, keeping the same name for the file.

2 Answers 2

1

Just add an appropriate filename extension to your current filename. You could use jpg or png:

plt.savefig("g3.19e10.01024.jpg")
plt.savefig("g3.19e10.01024.png")
Sign up to request clarification or add additional context in comments.

Comments

0

Try using

plt.savefig("your_file_name.png")

1 Comment

While this code may answer the question, providing additional context regarding how and/or why it solves the problem would improve the answer's long-term value. You can find more information on how to write good answers in the help center: stackoverflow.com/help/how-to-answer . Good luck 🙂

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.