Пример #1
0
#Z = Estrength(E)

if False:
    fig = p.figure()  # Create figure
    ax = Axes3D(fig)  # plot axes
    ax.plot_wireframe(X, Y, Z, color='r')
    #ax.imshow(Z) # red wireframe
    ax.set_xlabel('X')  # label axes
    ax.set_ylabel('Y')
    ax.set_zlabel('Potential')
    p.title("Two Capacitor Problem - Relaxation")
    p.show()  # display fig, close shell to quit

#plt.imshow(Z[3])
xE = E[X, Y, mid, 0]
yE = E[X, Y, mid, 1]

Q = plt.quiver(xE, yE)
plt.show()
#plt.quiver(Q,units = 'xy',scale = 1 )
'''
contourer =np.zeros((Nmax, Nmax,Nmax), float)
for i in xrange(0, Nmax):
    for j in xrange(0, Nmax):
        for k in xrange(0, Nmax):
            contourer[i][j][k] = E[i][j][k][3]
Axes3D.contour(contourer)
'''
plt.title('Electric Field Distribution')
#plt.colorbar()
plt.show()