Dear all,
I have a list with about 300 elements like the following:
listNames = [‘name1’, ‘name2’, ‘name3’, …]
I want to iterate through this list, creating several figures where each one will include two subplots.
The problem is that I want to label each figure like in the following example:
‘name1_name2.png’
How do I concatenate those names in the savefig() function?
Thanks,
Ana
It’s just as simple as:
savefig(‘name1’+’_’+‘name2’)
Ana Paula Leite wrote:
Dear all,
I have a list with about 300 elements like the following:
listNames = ['name1', 'name2', 'name3', ...]
I want to iterate through this list, creating several figures where each one will include two subplots.
The problem is that I want to label each figure like in the following example:
'name1_name2.png'
How do I concatenate those names in the savefig() function?
How about
name = "%s_%s.png" %(listNames[0], listNames[1])
savegig(name)
or
name = listNames[0] + "_" + listNames[1] + ".png"
···
--
cheers,
steve
Random number generation is the art of producing pure gibberish as quickly as possible.