for save_type in save_types: plt.savefig(figure_path + figure_name + save_type, dpi=150, transparent=True) print 'save as', figure_path + figure_name + save_type plt.show() plt.close() fatigue_model_list = ['BM', 'FS', 'SWT', 'Liu1', 'Liu2', 'Chu'] #fatigue_model_list = ['Our'] fatigue_model_list = ['Liu1'] fatigue_model_list = ['Study2'] #fatigue_model_list = ['Zamrik'] #fatigue_model_list = ['Vose'] ArticleFigureDirectory = 'F:\\Cloud\\Github\\tgmf\\figs\\' for fatigue_model in fatigue_model_list: fatigue_file = '%s%s.csv' % (FatigueDirectory, fatigue_model) fatigue_data = FatigueData(fatigue_file) figure_path = ArticleFigureDirectory figure_name = 'F-NF-TGMF-' + fatigue_model create_plot_data(fatigue_data, figure_path, figure_name) for fatigue_model in fatigue_model_list: figure_path = ArticleFigureDirectory figure_name = 'F-NF-TGMF-' + fatigue_model plot(figure_path, figure_name, save_types=['.pdf', '.png']) shutil.copy(__file__, ArticleFigureDirectory)
if figure_path <> None and figure_name <> None: for save_type in save_types: plt.savefig(figure_path + figure_name + save_type, dpi=150, transparent=True) print 'save as', figure_path + figure_name + save_type fatigue_model_list = ['Study', 'Study2'] TN_list = [] TRMS_list = [] for fatigue_model in fatigue_model_list: fatigue_file = '%s%s.csv' % (FatigueDirectory, fatigue_model) fatigue_data = FatigueData(fatigue_file) TN_list.append(fatigue_data.quantitativeTN()) TRMS_list.append(fatigue_data.quantitativeTRMS()) write_file(ArticleFigureDirectory + 'TN_list.txt', TN_list) write_file(ArticleFigureDirectory + 'TRMS_list.txt', TRMS_list) TN_list = read_file(ArticleFigureDirectory + 'TN_list.txt') TRMS_list = read_file(ArticleFigureDirectory + 'TRMS_list.txt') plot_format() mpl.rcParams['xtick.major.size'] = 0 mpl.rcParams['xtick.major.width'] = 0 #============================================================================== # x,y limite #==============================================================================