After running the following program in jupyter lab the saved filename is ('test_C0_s50_d', 1, 't', 2, '18_l1w')
, but I don't want parenthesis, comma, and spaces in the file name. I want something similar to test_C0_s50_d1t2_18_l1w
in the filename so that when changing i and j value I can find another name.
i = 1
j = 2
plt.scatter(1,2)
saving = 'test_C0_s50_d',i,'t',j,'18_l1w'
print(saving)
plt.savefig("{0}.png".format(saving))
plt.show()
You need to use
format
(or similar) to get the numbers where you want them: