global p_title_part q=raw_input('Title of the plot = '+str(p_title_part)+' ? [Y/n]') if(q=='n' or q=='N'): p_title_part =str(raw_input('Which title you favour my Highness: ')) check_p_title_part() return check_p_title_part() p_title = p_title_part+p_title_part_2+str(plt_ts*100+tstart) save_title = p_title_part+'_'+str((plt_ts+1)*100) ######################################################################## #Start plotting ######################################################################## print 'Doing ['+str(tstart)+':'+str(tstep)+':'+str(tend)+'] with nbins='+str(nbins)+' !' print 'Followed by style='+str(style)+' and plot timestep='+str(plt_ts)+' !' [interval, eulerian, l_diff, l_nodiff] = general_plot.read_data(data_path, tstart, tend, tstep, nbins) names = {} names[1]='Liquid' names[2]='l_diff' names[3]='l_nodiff' general_plot.plot_data(interval[:,plt_ts], eulerian[:,plt_ts], l_diff[:,plt_ts], l_nodiff[:,plt_ts], names, style, p_title) elif(plot_type == 1): ######################################################################## #Growth in time plot ########################################################################
print "time data", time_data_1[plt_ts_1], time_data_2[plt_ts_2] p_title_1 = p_title_part_1 + p_title_part_t + str(time_data_1[plt_ts_1] * t_real / 60) p_title_2 = p_title_part_1 + p_title_part_t + str(time_data_2[plt_ts_2] * t_real / 60) print "real time t1 t2", p_title_1, p_title_2 # p_title_1 = p_title_part_1+p_title_part_t+str(time_data_1[plt_ts_1]) # p_title_2 = p_title_part_1+p_title_part_t+str(time_data_2[plt_ts_2]) # p_title_3 = p_title_part_1+p_title_part_t+str(time_data_3[plt_ts_3]) # p_title_2 = p_title_part_2+p_title_part_t+str(plt_ts_2*100+tstart_2) save_title_1 = p_title_part_1 + "_" + str((plt_ts_1 + 1) * 100) save_title_2 = p_title_part_2 + "_" + str((plt_ts_2 + 1) * 100) ######################################################################## # Start plotting ######################################################################## [interval_1, eulerian_1, l_diff_1, l_nodiff_1] = general_plot.read_data( data_path_1, tstart_1, tend_1, tstep_1, nbins ) [interval_2, eulerian_2, l_diff_2, l_nodiff_2] = general_plot.read_data( data_path_2, tstart_2, tend_2, tstep_2, nbins ) if dycoms == 0: [interval_3, eulerian_3, l_diff_3, l_nodiff_3] = general_plot.read_data( data_path_3, tstart_3, tend_3, tstep_3, nbins ) else: interval_3 = np.zeros([100, 100]) eulerian_3 = np.zeros([100, 100]) l_diff_3 = np.zeros([100, 100]) l_nodiff_3 = np.zeros([100, 100]) time_real_3 = 0 # p_title_3 = 'Same resolution t=' + str(round(time_data_1[plt_ts_1]*t_real/60,2))