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
plsvfig(LS,NS,X_91, proj_val(X_91[:, 25] ), x_labels,y_labels,z_labels,title('9','1'), svfig('91'))
plsvfig(LS,NS,X_93, proj_val(X_93[:, 25] ), x_labels,y_labels,z_labels,title('9','3'), svfig('93'))
plsvfig(LS,NS,X_290,proj_val(X_290[:,25]),x_labels,y_labels,z_labels,title('29','0'),svfig('290'))

fig = pl.figure()
ax = fig.gca(projection = '3d')
cplsvfig(LS,NS,X_65, proj_val(X_65[:, 25] ), x_labels,y_labels,z_labels,title('6','5'), svfig('65'))
cplsvfig(LS,NS,X_91, proj_val(X_91[:, 25] ), x_labels,y_labels,z_labels,title('9','1'), svfig('91'))
cplsvfig(LS,NS,X_93, proj_val(X_93[:, 25] ), x_labels,y_labels,z_labels,title('9','3'), svfig('93'))
cplsvfig(LS,NS,X_290,proj_val(X_290[:,25]),x_labels,y_labels,z_labels,title('29','0'),svfig('290'))
#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('plots/combo_contour.png')#'plots/grad_A0_93_0.png')#, dpi = 300)
#pl.show()

fig = pl.figure()
ax = fig.gca(projection = '3d')
surf=ax.plot_surface(1e9*LS,NS,X_65,rstride=1,cstride=1, alpha=0.5,cmap=cm.Blues,linewidth = 0.05, antialiased = True, shade = False)
surf=ax.plot_surface(1e9*LS,NS,X_91,rstride=1,cstride=1, alpha=0.5,cmap=cm.Greens,linewidth = 0.05, antialiased = True, shade = False)
surf=ax.plot_surface(1e9*LS,NS,X_93,rstride=1,cstride=1, alpha=0.5,cmap=cm.Reds,linewidth = 0.05, antialiased = True, shade = False)
surf=ax.plot_surface(1e9*LS,NS,X_290,rstride=1,cstride=1,alpha=0.5,cmap=cm.hot,linewidth = 0.05, antialiased = True, shade = False)
#cbar.ax.set_ylabel(r'$\mathcal{A}^{(0)}_{[9,3]}\,\,\,[zJ]$', size = 14)
#pl.title(r'$\rm{Gradient\, \mathcal{A}^{(0)}\, for \,[9,3]\, in\,water}$',size = 21)
ax.view_init(elev = 17, azim = 150)
#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)
Ejemplo n.º 3
0
ax = fig.gca(projection = '3d')
ax.text(-7, 6, 0.7, r'$\zeta/\omega_{0}$', zdir = (-1,1,-3), size = 21)
figure()
#contourf(X,Y,h, 1000, cmap = hot())
surf = ax.plot_surface(X,Y,h, rstride = 20, cstride = 20,alpha = 0.2, cmap = cm.gnuplot, linewidth = 0.5)#gray)#coolwarm)#bone)#hot, linewidth = 0.01, antialiased = True, shade = False)# True)#, cmap = hot()
#surf = ax.plot_wireframe(X,Y,h, rstride = 20, cstride = 20,color = 'k')#True)# cmap = hot, shade = True)#,alpha = 0.9, cmap = cm.hot, linewidth = 0.01, antialiased = True, shade = False)# True)#, cmap = hot()
#colorbar(surf)
#cbar.ax.set_ylabel(r'$\frac{\xi}{\omega_{0}}$', size = 24)
#cset = ax.contour(X,Y,h, zdir = 'z', offset = 0, cmap = cm.jet)
#cset = ax.contour(X,Y,h, zdir = 'x', offset = 5, cmap = cm.jet)
#cset = ax.contourf(X,Y,h, zdir = 'y', offset = 6, cmap = cm.jet)# puts plot of max xi vs discrete r values at r=0 plane
#CS = contour(X,Y,h)#, colors = 'k')
#man_loc = [(1,1),(2,2),(3,3),(4,4)]
#clabel(CS, inline =1,fmt = '%1.1f', fontsize = 18,color = 'k', manual = man_loc)
#ax.grid(on = True)
ax.view_init(elev = 19, azim = -112)
#zlabel(r'$\xi/\omega_{0}$', size = 21)
#ylabel(r'$r$', size = 24)
#xlabel(r'$(\epsilon(0) -1)$', size = 24)
#text = Axes.text(self, x, y, s, **kwargs)
#art3d.text_2d_to_3d(text, z, zdir)
#return text

#pl.text(6,0, 0, r'$\xi/\omega_{0}$',size = 21 ,rotation = 'horizontal')
#ax.text(r'$\xi/\omega_{0}$',6,0, 0, size = 21 ,rotation = 'horizontal')
#ax.set_zlabel(r'$\xi/\omega_{0}$',size = 21 ,rotation = 'horizontal' )
ax.set_xlabel(r'$\epsilon(0)-1$', size = 21)
ax.set_ylabel(r'$r$', size = 22)

#ax.set_zlabel(r'$\xi/\omega_{0}$', size = 22)
#ax.axhline(y = 1, color = 'k', linewidth = 2)
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()

##### A_2 PLOTS ######
fig = figure()
ax = fig.gca(projection = '3d')
surf_065 = ax.plot_surface(1e9*X,Y,1e21*A2_065_theta, rstride = 5, 
        cstride =5,alpha=0.7,cmap=cm.Blues, linewidth = 0.05, antialiased = True, shade = False)# True)#, cmap = hot()
surf_091 = ax.plot_surface(1e9*X,Y,1e21*A2_091_theta, rstride = 5, 
        cstride =5,alpha=0.7,cmap=cm.Greens, linewidth = 0.05, antialiased = True, shade = False)# True)#, cmap = hot()
surf_290 = ax.plot_surface(1e9*X,Y,1e21*A2_290_theta, rstride = 5, 
        cstride =5,alpha=0.7,cmap=cm.Reds, linewidth = 0.05, antialiased = True, shade = False)# True)#, cmap = hot()

CS_065 = contour(1e9*X,Y,1e21*A2_065_theta, colors = 'k', linewidth = 1.5)
CS_091 = contour(1e9*X,Y,1e21*A2_091_theta, colors = 'k', linewidth = 1.5)
Ejemplo n.º 5
0
fig = figure()
ax = fig.gca(projection = '3d')
ax.text(-7, 6, 0.7, r'$\zeta/\omega_{0}$', zdir = (-1,1,-3), size = 21)
#figure()
#contourf(X,Y,h, 1000, cmap = hot())
surf = ax.plot_surface(X,Y,h, rstride = 1, cstride = 1,alpha = 0.9, cmap = cm.hot, linewidth = 0.01, antialiased = True, shade = False)# True)#, cmap = hot()
colorbar(surf)
#cbar.ax.set_ylabel(r'$\frac{\xi}{\omega_{0}}$', size = 24)
##cset = ax.contour(X,Y,h, zdir = 'z', offset = 0, cmap = cm.jet)
#cset = ax.contour(X,Y,h, zdir = 'x', offset = 20, cmap = cm.jet)
##cset = ax.contour(X,Y,h, zdir = 'y', offset = 0, cmap = cm.jet)# puts plot of max xi vs discrete r values at r=0 plane
#CS = contour(X,Y,h, colors = 'k')
#man_loc = [(1,1),(2,2),(3,3),(4,4)]
#clabel(CS, inline =1,fmt = '%1.1f', fontsize = 18,color = 'k', manual = man_loc)
#ax.grid(on = True)
ax.view_init(elev = 34, azim = -135)
#zlabel(r'$\xi/\omega_{0}$', size = 21)
#ylabel(r'$r$', size = 24)
#xlabel(r'$(\epsilon(0) -1)$', size = 24)
#text = Axes.text(self, x, y, s, **kwargs)
#art3d.text_2d_to_3d(text, z, zdir)
#return text

#pl.text(6,0, 0, r'$\xi/\omega_{0}$',size = 21 ,rotation = 'horizontal')
#ax.text(r'$\xi/\omega_{0}$',6,0, 0, size = 21 ,rotation = 'horizontal')
#ax.set_zlabel(r'$\xi/\omega_{0}$',size = 21 ,rotation = 'horizontal' )
ax.set_xlabel(r'$\epsilon(0)-1$', size = 21)
ax.set_ylabel(r'$r$', size = 22)

#ax.set_zlabel(r'$\xi/\omega_{0}$', size = 22)
#ax.axhline(y = 1, color = 'k', linewidth = 2)