コード例 #1
0
def cplsvfig(LLS,NNS,X,projval,x_label,y_label,z_label,Title_fnc,save_fnc):
    surf=ax.plot_surface(1e9*LS,NS,X,rstride=1,cstride=1,alpha=0.7,cmap=cm.bone,linewidth = 0.05, antialiased = True, shade = False)
    CS = contour(1e9*LLS,NNS,X, colors = 'k', linewidth = 0.5)
    cbar = pl.colorbar(surf)
    #cbar.ax.set_ylabel(r'$\mathcal{A}^{(0)}_{[9,3]}\,\,\,[zJ]$', size = 14)
    cbar.add_lines(CS)
    cset = ax.contour(1e9*LLS,NNS,X,zdir='z',offset = projval ,cmap = cm.Blues)
    return 0
コード例 #2
0
def plsvfig(LLS,NNS,X,projval,x_label,y_label,z_label,Title_fnc,save_fnc):
    fig = pl.figure()
    ax = fig.gca(projection = '3d')
    surf=ax.plot_surface(1e9*LS,NS,X,rstride=1,cstride=1,alpha=0.7,cmap=cm.winter,linewidth = 0.05, antialiased = True, shade = False)
    CS = contour(1e9*LLS,NNS,X, colors = 'k', linewidth = 0.5)
    cbar = pl.colorbar(surf)
    #cbar.ax.set_ylabel(r'$\mathcal{A}^{(0)}_{[9,3]}\,\,\,[zJ]$', size = 14)
    cbar.add_lines(CS)
    cset = ax.contour(1e9*LLS,NNS,X,zdir='z',offset = projval ,cmap = cm.Blues)
    ax.set_xlabel(x_label)
    ax.set_ylabel(y_label)
    ax.set_zlabel(z_label)
    pl.title(Title_fnc)
    #pl.title(r'$\rm{Gradient\, \mathcal{A}^{(0)}\, for \,[9,3]\, in\,water}$',size = 21)
    ax.view_init(elev = 17, azim = 150)
    savefig(save_fnc)#'plots/grad_A0_93_0.png')#, dpi = 300)
    #pl.show()
    return 0
コード例 #3
0
CS_091_0 = contour(1e9*X,Y,1e21*A0_091_theta, colors = 'k', linewidth = 1.5)
CS_290_0 = contour(1e9*X,Y,1e21*A0_290_theta, colors = 'k', linewidth = 1.5)

cbar_065_0 = pl.colorbar(surf_065_0)
cbar_065_0.ax.set_ylabel(r'$\mathcal{A}^{(0)}_{[6,5]}\,\,\,[zJ]$', size = 14)
cbar_065_0.add_lines(CS_065_0)

cbar_091_0 = pl.colorbar(surf_091_0)
cbar_091_0.ax.set_ylabel(r'$\mathcal{A}^{(0)}_{[9,1]}\,\,\,[zJ]$', size = 14)
cbar_091_0.add_lines(CS_091_0)

cbar_290_0 = pl.colorbar(surf_290_0)
cbar_290_0.ax.set_ylabel(r'$\mathcal{A}^{(0)}_{[29,0]}\,\,\,[zJ]$', size = 14)
cbar_290_0.add_lines(CS_290_0)

cset_065_0 = ax.contour(1e9*X,Y,1e21*A0_065_theta,zdir='y',offset = -0.3,cmap = cm.Blues)
cset_091_0 = ax.contour(1e9*X,Y,1e21*A0_091_theta,zdir='y',offset = -0.3,cmap = cm.Greens)
cset_290_0 = ax.contour(1e9*X,Y,1e21*A0_290_theta,zdir='y',offset = -0.3,cmap = cm.Reds)
#man_loc = [(.1,.1),(.2,.2),(.3,.3),(.4,.4)]
yticks([0, pi/8, pi/6, pi/4, pi/3, pi/2],
        ['$0$', r'$\frac{\pi}{8}$', r'$\frac{\pi}{6}$', r'$\frac{\pi}{4}$', r'$\frac{\pi}{3}$', r'$\frac{\pi}{2}$'])
#clabel(CS, inline =1,fmt = '%1.1f', fontsize = 18,color = 'k', manual = man_loc)
ax.grid(on = True)
ax.set_xlabel(r'$\rm{separation}\,\,\,\ell\,\,[nm]$',   size = 18)
ax.set_ylabel(r'$\rm{angle}\,\,\,\theta\,\,[radians]$', size = 18)
ax.set_zlabel(r'$\mathcal{A}^{(0)}\,\,[zJ]$',size = 18 ,rotation = 'horizontal' )
pl.title(r'$\rm{\mathcal{A}^{(0)}\, for \, [6,5],[9,1],\,and\,[29,0]\, in\,water}$',
        size = 21)
ax.view_init(elev = 10, azim = 65)
savefig('plots/A0_65_91_290.png')#, dpi = 300)
show()