print paths nb_dirs = len(paths) # dicos = [] for ii in xrange(nb_dirs): dico, c = load_from_namedir(set_of_dir_results, paths[ii]) # dicos.append(dico) t = dico['t'] E = dico['E'] color = colors[c] ax1.plot(t, E, color + style_lines, linewidth=linewidth) resol = 1920 plot_one_resol(resol, style_lines='-', linewidth=1) # ax1.set_xlim([0,1e2]) # ax1.set_ylim([0,19]) # ax1.xaxis.set_ticks(np.linspace(0, 100, 5)) fontsize = 10 # ax2.text(181, 17.5, r'$c=1000$', fontsize=fontsize) create_fig.save_fig(fig=fig) create_fig.show()
# plt.rc('legend', numpoints=1) # leg1 = plt.figlegend( # [l_Etot[0], l_EK[0], l_EA[0]], # ['$E$', '$E_K$', '$E_A$'], # loc=(0.78, 0.7), # labelspacing = 0.2 # ) # ax1.set_xlim([0, 110]) # ax1.set_ylim([0, 4.8]) create_fig.save_fig() solveq2d.show()
vecx = ux vecy = uy ax.quiver(XX_seq[::pas_vector, ::pas_vector] / Lf, YY_seq[::pas_vector, ::pas_vector] / Lf, vecx[::pas_vector, ::pas_vector], vecy[::pas_vector, ::pas_vector]) if c == 20: for_letter = r'(\textit{a})' + r' $c = ' + '{0:.0f}'.format(c) + '$' elif c == 200: for_letter = r'(\textit{b})' + r' $c = ' + '{0:.0f}'.format(c) + '$' fig.text(0.01, 0.955, for_letter, fontsize=fontsize + 2) fig.text(0.9, 0.04, r'$h$', fontsize=fontsize + 4) create_fig.save_fig(format='eps') name_file = 'fig_2Duy_c{0:.0f}'.format(c) fig, ax = create_fig.figure_axe(name_file=name_file, fig_width_mm=fig_width_mm, fig_height_mm=fig_height_mm, size_axe=size_axe) ax.set_xlabel(r'$x/L_f$') ax.set_ylabel(r'$y/L_f$') field = uy maxfield = field.max() minfield = field.min()