本文整理汇总了Python中mpl_toolkits.mplot3d.Axes3D.set_ylabel方法的典型用法代码示例。如果您正苦于以下问题:Python Axes3D.set_ylabel方法的具体用法?Python Axes3D.set_ylabel怎么用?Python Axes3D.set_ylabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mpl_toolkits.mplot3d.Axes3D
的用法示例。
在下文中一共展示了Axes3D.set_ylabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: custom_plot
# 需要导入模块: from mpl_toolkits.mplot3d import Axes3D [as 别名]
# 或者: from mpl_toolkits.mplot3d.Axes3D import set_ylabel [as 别名]
def custom_plot(self, additional):
for k in additional:
if(k == Simulation.DISCRETIZE):
for i in range(self.examples.noutputs):
for j in range(self.nbr_epoch):
if(self.plots['discretize_div'][i][j] != 0):
self.plots['discretize'][i][j] /= (self.plots['discretize_div'][i][j] * (self.nbDiscre ** self.nbDiscre))
colors = [(0.2, 0.8, 0.88), 'b', 'g', 'r', 'c', 'm', 'y', 'k', (0.8, 0.1, 0.8), (0., 0.2, 0.5)]
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
for j in range(self.examples.noutputs):
ax.scatter([self.plots['discretize'][j][k] for k in self.plots['discretize_valid'][j]], [j] *
len(self.plots['discretize_valid'][j]), self.plots['discretize_valid'][j], color=colors[j], marker='x')
ax.set_xlabel('DISCRETIZED VALUE')
ax.set_ylabel('SHAPE')
ax.set_zlabel('EPOCH')
path = "/tmp/pyplot.%s.%s.png" % (sys.argv[0], time.strftime("%m-%d-%H-%M-%S", time.localtime()))
plt.savefig(path)
plt.show()
plt.title('Discretize hidden layer')
plt.ylabel('DISCRETIZED VALUE')
plt.xlabel("EPOCHS")
for j in range(self.examples.noutputs):
plt.plot(self.plots['discretize_valid'][j], [self.plots['discretize'][j][k]
for k in self.plots['discretize_valid'][j]], '.', color=colors[j])
path = "/tmp/pyplot.%s.%s.png" % (sys.argv[0], time.strftime("%m-%d-%H-%M-%S", time.localtime()))
try:
plt.savefig(path)
except ValueError:
print('Cannot save discretize_cloud')
try:
plt.show()
except ValueError:
print('Cannot display discretize_cloud')
elif(k == Simulation.PROTOTYPE):
lplot = [[0. for _ in range(self.examples.ninputs)] for _ in range(self.examples.noutputs)]
for network in self.networks:
for i in range(len(self.examples.inputs)):
network['FoN'].calc_output(self.examples.inputs[i])
network['SoN'].calc_output(network['FoN'].stateHiddenNeurons)
im = index_max(self.examples.outputs[i])
for j in range(self.examples.ninputs):
lplot[im][j] += network['SoN'].stateOutputNeurons[j]
fig = plt.figure()
plt.clf()
for i in range(self.examples.noutputs):
rpr.show_repr(lplot[i], self.width, fig, 250 + i, i)
path = "/tmp/pyplot.%s.%s.png" % (sys.argv[0], time.strftime("%m-%d-%H-%M-%S", time.localtime()))
plt.savefig(path)
plt.show()
示例2: saveoutput
# 需要导入模块: from mpl_toolkits.mplot3d import Axes3D [as 别名]
# 或者: from mpl_toolkits.mplot3d.Axes3D import set_ylabel [as 别名]
#.........这里部分代码省略.........
ylabel('$I_{DS} [\mu A/\mu m]$')
title('$I_{DS}$ vs. $V_{DS}$')
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')
############################################################################################