Skip to content
Snippets Groups Projects
Commit c7ab3a29 authored by Christoph Groth's avatar Christoph Groth
Browse files

minor band-structure-related renames in the tutorial

parent cb197375
No related branches found
No related tags found
No related merge requests found
......@@ -9,12 +9,12 @@
def make_lead(a=1, t=1.0, W=10):
# Start with an empty lead with a single square lattice
@@ -37,11 +38,19 @@
energies = kwant.physics.Bands(lead)
energy_list = [energies(k) for k in momenta]
bands = kwant.physics.Bands(lead)
energies = [bands(k) for k in momenta]
- pyplot.figure()
+ fig = pyplot.figure()
pyplot.plot(momenta, energy_list)
pyplot.plot(momenta, energies)
- pyplot.xlabel("momentum [in units of (lattice constant)^-1]")
- pyplot.ylabel("energy [in units of t]")
- pyplot.show()
......
......@@ -42,12 +42,12 @@
def plot_bandstructure(flead, momenta):
energies = kwant.physics.Bands(flead)
energy_list = [energies(k) for k in momenta]
bands = kwant.physics.Bands(flead)
energies = [bands(k) for k in momenta]
- pyplot.figure()
+ fig = pyplot.figure()
pyplot.plot(momenta, energy_list)
pyplot.plot(momenta, energies)
- pyplot.xlabel("momentum [in units of (lattice constant)^-1]")
- pyplot.ylabel("energy [in units of t]")
- pyplot.show()
......
......@@ -9,12 +9,12 @@
tau_x = tinyarray.array([[0, 1], [1, 0]])
tau_z = tinyarray.array([[1, 0], [0, -1]])
@@ -46,12 +47,19 @@
energies = kwant.physics.Bands(lead)
energy_list = [energies(k) for k in momenta]
bands = kwant.physics.Bands(lead)
energies = [bands(k) for k in momenta]
- pyplot.figure()
+ fig = pyplot.figure()
pyplot.plot(momenta, energy_list)
pyplot.plot(momenta, energies)
pyplot.xlabel("momentum [in untis of (lattice constant)^-1]")
pyplot.ylabel("energy [in units of t]")
pyplot.ylim([-0.8, 0.8])
......
......@@ -37,11 +37,11 @@ def make_lead(a=1, t=1.0, W=10):
#HIDDEN_BEGIN_pejz
def plot_bandstructure(lead, momenta):
energies = kwant.physics.Bands(lead)
energy_list = [energies(k) for k in momenta]
bands = kwant.physics.Bands(lead)
energies = [bands(k) for k in momenta]
pyplot.figure()
pyplot.plot(momenta, energy_list)
pyplot.plot(momenta, energies)
pyplot.xlabel("momentum [in units of (lattice constant)^-1]")
pyplot.ylabel("energy [in units of t]")
pyplot.show()
......
......@@ -129,11 +129,11 @@ def plot_conductance(sys, energies):
def plot_bandstructure(flead, momenta):
energies = kwant.physics.Bands(flead)
energy_list = [energies(k) for k in momenta]
bands = kwant.physics.Bands(flead)
energies = [bands(k) for k in momenta]
pyplot.figure()
pyplot.plot(momenta, energy_list)
pyplot.plot(momenta, energies)
pyplot.xlabel("momentum [in units of (lattice constant)^-1]")
pyplot.ylabel("energy [in units of t]")
pyplot.show()
......
......@@ -45,11 +45,11 @@ def make_lead(a=1, t=1.0, mu=0.7, Delta=0.1, W=10):
def plot_bandstructure(lead, momenta):
energies = kwant.physics.Bands(lead)
energy_list = [energies(k) for k in momenta]
bands = kwant.physics.Bands(lead)
energies = [bands(k) for k in momenta]
pyplot.figure()
pyplot.plot(momenta, energy_list)
pyplot.plot(momenta, energies)
pyplot.xlabel("momentum [in untis of (lattice constant)^-1]")
pyplot.ylabel("energy [in units of t]")
pyplot.ylim([-0.8, 0.8])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment