diff --git a/doc/source/images/3-band_structure.py.diff b/doc/source/images/3-band_structure.py.diff index fc560a14a393d7f95cbd0966997db80c0bd9fcc1..c84cb9f24d28a1056812304bbaaa1858be362ce3 100644 --- a/doc/source/images/3-band_structure.py.diff +++ b/doc/source/images/3-band_structure.py.diff @@ -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() diff --git a/doc/source/images/4-graphene.py.diff b/doc/source/images/4-graphene.py.diff index 1cb4495fe93f9e9e5e204b9ce3320800c61fe0eb..c713f821d48b409113f1423d7770341634c45aa5 100644 --- a/doc/source/images/4-graphene.py.diff +++ b/doc/source/images/4-graphene.py.diff @@ -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() diff --git a/doc/source/images/5-superconductor_band_structure.py.diff b/doc/source/images/5-superconductor_band_structure.py.diff index c06ab1f13b99396197af6f6d2791bbda130264ff..31f527d87951f1e62bf3c0a63e731d29d5146ca6 100644 --- a/doc/source/images/5-superconductor_band_structure.py.diff +++ b/doc/source/images/5-superconductor_band_structure.py.diff @@ -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]) diff --git a/doc/source/tutorial/3-band_structure.py b/doc/source/tutorial/3-band_structure.py index e89acbae84e84956e54583019bd99246a2b5abcd..711e45d141a02ef1616661cf1f57ca88afe9e58d 100644 --- a/doc/source/tutorial/3-band_structure.py +++ b/doc/source/tutorial/3-band_structure.py @@ -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() diff --git a/doc/source/tutorial/4-graphene.py b/doc/source/tutorial/4-graphene.py index d0dedb1474d3bf0ef6c84eebb852cee5a096eab2..69efce4b9b4c7458c52a57ca125ead565906ea1f 100644 --- a/doc/source/tutorial/4-graphene.py +++ b/doc/source/tutorial/4-graphene.py @@ -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() diff --git a/doc/source/tutorial/5-superconductor_band_structure.py b/doc/source/tutorial/5-superconductor_band_structure.py index 56f3ef5c5c69e227e3a0bf07a3e937b2debc2fb9..82ae78866a1f6a2162510a674007afb8b0e57add 100644 --- a/doc/source/tutorial/5-superconductor_band_structure.py +++ b/doc/source/tutorial/5-superconductor_band_structure.py @@ -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])