Reputation: 999
I want to save the figures in a given path, and write the following code:
savefig('/Users/gaoyingqiang/Desktop/1-153Umlauf'+str(p)+'.png')
But in fact python only names the figures "1-153Umlauf1.png", and they are all saved on the desktop. How can I save the figures in the folder 1-153Umlauf?
Thanks everyone!
Upvotes: 2
Views: 9496
Reputation: 169494
Use os.path.join
:
output_path = os.path.join('/Users/gaoyingqiang/Desktop/1-153Umlauf',str(p)+'.png')
Upvotes: 2