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. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users