0

So say I have several 2 d plots of the usual x-y format:

ex: 1) x=(0,1,2,3,4,..100), y=(0,2,4,6,8,10,....)

I would like to have my x-y scatter plots saved somehow, so that once all the x-y plots are generated, I could merge them on to one big graph where these graphs now form an array. Just imagine if each of the plots represent some kind of a time evolution. I have already tried using savefigure but cannot see a saved file. Thanks!

1 Answer 1

1

Can't find the figures after issuing plt.savefig(some_filename)? Find out what is your current working directory, the figure files should be there:

import os
os.getcwd() #Gives you the current working directory.

Of course, if you not only provided the filename but also the path to it for plt.savefig(), you should see your figure in the path you specified.

You figure comes out OK right? If you issue a plt.show(), do you get the correct figure?

Sign up to request clarification or add additional context in comments.

1 Comment

No it doesn't work. I have checked the directory, it's correct. but there is no file being saved even though I get no errors. Is there an alternative?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.