Thanks, I now changed the order, but I still get the same error message. So now the code reads

 

    kwant.plotter.map(sys, V)

    sys = sys.finalized()

 

but now it seems to be in a different place the error message is now ‘int’ object has no attribute ‘site’, and the V-function is still

 

def V(sys):

    Hd = onsite(site)

    return (Hd[0,0] - Hd[1,1]).real

 

Best,

Camilla