本文整理匯總了Python中mpl_toolkits.mplot3d.Axes3D.view_init方法的典型用法代碼示例。如果您正苦於以下問題:Python Axes3D.view_init方法的具體用法?Python Axes3D.view_init怎麽用?Python Axes3D.view_init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mpl_toolkits.mplot3d.Axes3D
的用法示例。
在下文中一共展示了Axes3D.view_init方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: saveoutput
# 需要導入模塊: from mpl_toolkits.mplot3d import Axes3D [as 別名]
# 或者: from mpl_toolkits.mplot3d.Axes3D import view_init [as 別名]
#.........這裏部分代碼省略.........
savefig('ID_VD.png')
#temmm = [Vd_bias, Ie[0,:]]
#np.savetxt('ID_VD.dat', temmm, fmt='%e', delimiter=';')
temmm = Vd_bias
Ie2 = Ie.transpose()
fid = open('ID_{VD}.dat','w')
ind = 0
for item1 in temmm:
fid.write("%e " % item1)
for item2 in Ie2[ind,:]:
fid.write("%e " % item2)
fid.write('\n')
ind += 1
fid.close()
#if plot_Iv==1 end
#***************************************************************************************
# Ec(X,Y)
# -------------------------------------------
if plot_Ec3d == 1:
figure(6)
[X, Y] = np.meshgrid(XI, YI)
Z = trMEc
ax = gca(projection = '3d')
surf = ax.plot_surface(X, Y, Z, rstride=3, cstride=3, cmap=cm.coolwarm, linewidth=0.5, antialiased = True)
#surf(XI,YI,trMEc)
#shading interp commented out to reduce size of the .ps file
title('3D Conduction band edge potential profile')
ax.set_xlabel('X [nm]')
ax.set_ylabel('Y [nm]')
ax.set_zlabel('Ec [eV]')
ax.view_init(elev=60, azim=50)
ax.dist=8
savefig('Ec_X_Y.png')
XII = (0, XI)
tem1 = (YI, trMEc)
tem2 = (XII, tem1)
#np.savetxt('Ec_X_Y.dat', tem2, fmt='%e', delimiter=';')
#f1 = open('Ec_X_Y','w')
#writer = csv.writer(f1, delimiter = ',')
#writer.writerows(tem2)
#*******************************************************************************************
if (plot_Ecsub==1 and max_subband>=1):
figure(8)
for iii in np.arange(0,max_subband):
plot(XI, E_sub[0, Ng_step, Nd_step, :, iii],'r-')
hold(True)
grid(True)
if (t_vall==3):
plot(XI, E_sub[1, Ng_step, Nd_step, :,iii],'k-')
plot(XI, E_sub[2, Ng_step, Nd_step, :,iii],'-')
title('The Subbands energy profile along the channel')
xlabel('X [nm]')
ylabel('E_{SUB} [eV]')
savefig('Ec_sub_X.png')
############################################################################################
if (plot_Nesub==1 and max_subband>=1):
figure(9)