As i am following kwant tutorial 2.7.1. 2D example: graphene quantum dot:

This part of the code will finally produce the error:

def family_shape(i):
        site = sys.site(i)
        return ('p', 3, 180) if site.family == a else ('p', 3, 0)

    def family_color(i):
        return 'black' if sys.site(i).family == a else 'white'

    kwant.plot(sys, site_color=wf, site_symbol=family_shape,
               site_size=0.5, hop_lw=0, cmap='gist_heat_r')

    # plot by changing the symbols itself
    def site_size(i):
        return 3 * wf[i] / wf.max()

    kwant.plot(sys, site_size=site_size, site_color=(0, 0, 1, 0.3),
               hop_lw=0.1)


Error:
Exception in image/png formatter: Transforms must be a Nx3x3 numpy array
  FormatterWarning,
<matplotlib.figure.Figure at 0x10b7e030>

And there's no plot produced...
So im wondering how to fix this one


Reply via email to