def _print_figures(figures, arguments='<STR_LIT>', file_format='<STR_LIT>', target_width=<NUM_LIT>, target_height=<NUM_LIT>, target_pad=<NUM_LIT:0.5>):
for fig in figures:<EOL><INDENT>temp_path = _os.path.join(_settings.path_home, "<STR_LIT>")<EOL>_settings.MakeDir(temp_path)<EOL>path = _os.path.join(temp_path, "<STR_LIT>"+file_format)<EOL>w=fig.get_figwidth()<EOL>h=fig.get_figheight()<EOL>target_height = target_height-<NUM_LIT:2>*target_pad<EOL>target_width  = target_width -<NUM_LIT:2>*target_pad<EOL>if <NUM_LIT:1.0>*h/w > target_height/target_width:<EOL><INDENT>new_h = target_height<EOL>new_w = w*target_height/h<EOL><DEDENT>else:<EOL><INDENT>new_w = target_width<EOL>new_h = h*target_width/w<EOL><DEDENT>fig.set_figwidth(new_w)<EOL>fig.set_figheight(new_h)<EOL>fig.savefig(path, bbox_inches=_pylab.matplotlib.transforms.Bbox(<EOL>[[-target_pad, new_h-target_height-target_pad],<EOL>[target_width-target_pad, target_height-target_pad]]))<EOL>fig.set_figheight(h)<EOL>fig.set_figwidth(w)<EOL>if not arguments == '<STR_LIT>':<EOL><INDENT>c = _settings['<STR_LIT>'] + '<STR_LIT:U+0020>' + arguments + '<STR_LIT>' + path + '<STR_LIT:">'<EOL><DEDENT>else:<EOL><INDENT>c = _settings['<STR_LIT>'] + '<STR_LIT>' + path + '<STR_LIT:">'<EOL><DEDENT>print(c)<EOL>_os.system(c)<EOL><DEDENT>
figure printing loop designed to be launched in a separate thread.