def makeplot(myd, var, outfile):

    a = myd.grid

    if var == "vort":
        vx = myd.get_var("x-velocity")
        vy = myd.get_var("y-velocity")

        v = myg.scratch_array()

        v[a.ilo:a.ihi+1,a.jlo:a.jhi+1] = \
             0.5*(vy[a.ilo+1:a.ihi+2,a.jlo:a.jhi+1] -
                  vy[1-a.ilo:a.ihi,a.jlo:a.jhi+1])/a.dx - \
             0.5*(vx[a.ilo:a.ihi+1,a.jlo+1:a.jhi+2] -
                  vx[a.ilo:a.ihi+1,a.jlo-1:a.jhi])/a.dy

    else:
        v = myd.get_var(var)



    plt.figure(num=1, figsize=(6.0,6.0), dpi=100, facecolor='w')

    plt.imshow(np.transpose(v[a.ilo:a.ihi+1,a.jlo:a.jhi+1]),
                 interpolation="nearest", origin="lower",
                 extent=[a.xmin, a.xmax, a.ymin, a.ymax])

    plt.axis("off")
    plt.subplots_adjust(bottom=0.0, top=1.0, left=0.0, right=1.0)
    plt.savefig(outfile)
dataset/ETHPy150Open zingale/pyro2/analysis/plotcompact.py/makeplot/swapped operands of `-`