def animate2D(i): z = plotProbabilityFile[plotResX1*plotResX2*i:plotResX1*plotResX2*(i+1)].reshape(plotResX2,plotResX1) plt.sca(ax1) probPlot1 = plt.contourf(x1,x2,z, cmap=ccmaps.cmap('vaagen_colorscale'), zorder = 1, vmin = 0, vmax = maxProb) plt.sca(ax2) probPlot2 = plt.contourf(x1,x2,z, cmap=ccmaps.cmap('vaagen_colorscale'), zorder = 1, vmin = 0, vmax = maxProb*scaleConstAx2) plt.sca(ax3) probPlot3 = plt.contourf(x1,x2,z, cmap=ccmaps.cmap('vaagen_colorscale'), zorder = 1, vmin = 0, vmax = maxProb*scaleConstAx3) plt.sca(ax4) probPlot3 = plt.contourf(x1,x2,z, cmap=ccmaps.cmap('vaagen_colorscale'), zorder = 1, vmin = 0, vmax = maxProb*scaleConstAx4) return probPlot1, probPlot2, probPlot3, probPlot4
def init2D(): x1, x2 = np.meshgrid(np.linspace(0,Lx1,plotResX1), np.linspace(0,Lx2,plotResX2)) z = potentialFile[0:Nx1*Nx2:plotSpacingX1].reshape(Nx2,plotResX1)[0:Nx2:plotSpacingX2,:] colorLimit = max(abs(potentialFile)) if colorLimit == 0: colorLimit = 1 plt.sca(ax1) potentialPlot1 = plt.contourf(x1, x2, z, cmap=ccmaps.cmap('white_black'), zorder = 2, vmin = - colorLimit, vmax = colorLimit) plt.sca(ax2) potentialPlot3 = plt.contourf(x1, x2, z, cmap=ccmaps.cmap('white_black'), zorder = 2, vmin = - colorLimit, vmax = colorLimit) plt.sca(ax3) potentialPlot2 = plt.contourf(x1, x2, z, cmap=ccmaps.cmap('white_black'), zorder = 2, vmin = - colorLimit, vmax = colorLimit) plt.sca(ax4) potentialPlot4 = plt.contourf(x1, x2, z, cmap=ccmaps.cmap('white_black'), zorder = 2, vmin = - colorLimit, vmax = colorLimit) return potentialPlot1, potentialPlot2, potentialPlot3, potentialPlot4,