cb=Nonedefplot_result(result,n,fig=None,axes=None):globalcbiffigisNoneoraxesisNone:fig,ax=plot_setup(result)axes.cla()# trace out the atomrho_cavity=ptrace(result.states[n],0)W=wigner(rho_cavity,xvec,xvec)surf=axes.plot_surface(X,Y,W,rstride=1,cstride=1,cmap=cm.jet,alpha=1.0,linewidth=0.05,vmax=0.25,vmin=-0.25)axes.set_xlim3d(-5,5)axes.set_ylim3d(-5,5)axes.set_zlim3d(-0.25,0.25)ifnotcb:cb=plt.colorbar(surf,shrink=0.65,aspect=20)returnfig,axes