kwant plot does not
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,
This is a known incompatibility of matplotlib 1.4.x and kwant <=1.0.1. It is fixed in kwant 1.0.2, please update. Best, Michael On 09.02.2015 22:26, ts wrote:
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,
And there's no plot produced... So im wondering how to fix this one
I downloaded from http://downloads.kwant-project.org/gohlke-mirror/ where there's only 1.00 version. I'm using win7 and i'm suffering from installing package. First, pip install kwant does not quite work. And then i downloaded kwant.whl file, but the issue is how exactly this can be installed? I go through the internet but there's no step by step instructions on it.What command should i use to get it installed? PS,the wheel is installed. I really want to use this package but couldnt get it installed....
participants (2)
-
Michael Wimmer
-
ts