diff --git a/doc/source/images/ab_ring.py.diff b/doc/source/images/ab_ring.py.diff
index 4793b7727a49eaf09e32cdef64df9f0573893f41..bacb520123f3c4583447ee9114e3aa06dcb39452 100644
--- a/doc/source/images/ab_ring.py.diff
+++ b/doc/source/images/ab_ring.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -9,6 +9,7 @@
+@@ -12,6 +12,7 @@
  #    example, but in the tutorial main text)
  #  - Modifcations of hoppings/sites after they have been added
  
@@ -8,7 +8,7 @@
  from cmath import exp
  from math import pi
  
-@@ -37,12 +38,13 @@
+@@ -40,12 +41,13 @@
      sys[lat.shape(ring, (0, r1 + 1))] = 4 * t
      sys[lat.neighbors()] = -t
  
@@ -28,7 +28,7 @@
          return exp(1j * phi)
  
      def crosses_branchcut(hop):
-@@ -78,6 +80,50 @@
+@@ -81,6 +83,50 @@
      return sys
  
  
@@ -79,7 +79,7 @@
  def plot_conductance(sys, energy, fluxes):
      # compute conductance
  
-@@ -87,18 +133,31 @@
+@@ -90,18 +136,31 @@
          smatrix = kwant.smatrix(sys, energy, args=[flux])
          data.append(smatrix.transmission(1, 0))
  
@@ -116,7 +116,7 @@
  
      # Finalize the system.
      sys = sys.finalized()
-@@ -108,6 +167,17 @@
+@@ -111,6 +170,17 @@
                                                  for i in xrange(100)])
  
  
diff --git a/doc/source/images/band_structure.py.diff b/doc/source/images/band_structure.py.diff
index 1a848e850b083729456ba9f53280495638794d72..90d735445d34d33297a7a5532ff9b867892cb34b 100644
--- a/doc/source/images/band_structure.py.diff
+++ b/doc/source/images/band_structure.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -6,6 +6,7 @@
+@@ -9,6 +9,7 @@
  # --------------------------
  #  - Computing the band structure of a finalized lead.
  
@@ -8,7 +8,7 @@
  import kwant
  
  # For plotting.
-@@ -33,10 +34,19 @@
+@@ -36,10 +37,19 @@
  
  def main():
      lead = make_lead().finalized()
diff --git a/doc/source/images/closed_system.py.diff b/doc/source/images/closed_system.py.diff
index 9b3c0dc09c3b1423ad56883650ac59494ebaf08c..ba6e26d8f254e257fe8f18a17ee9a66a2620161e 100644
--- a/doc/source/images/closed_system.py.diff
+++ b/doc/source/images/closed_system.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -8,6 +8,7 @@
+@@ -11,6 +11,7 @@
  #  - Use of `hamiltonian_submatrix` in order to obtain a Hamiltonian
  #    matrix.
  
@@ -8,7 +8,7 @@
  from cmath import exp
  import numpy as np
  import kwant
-@@ -65,29 +66,39 @@
+@@ -68,29 +69,39 @@
  
          energies.append(ev)
  
diff --git a/doc/source/images/graphene.py.diff b/doc/source/images/graphene.py.diff
index 0ed96e47b2ad4aa71a3f4b4268594db805caffaa..b87add8e8fa84496e1c7aaab65fad8ff0a51ccb6 100644
--- a/doc/source/images/graphene.py.diff
+++ b/doc/source/images/graphene.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -8,6 +8,7 @@
+@@ -11,6 +11,7 @@
  #    lattice, namely graphene
  
  from __future__ import division  # so that 1/2 == 0.5, and not 0
@@ -8,7 +8,7 @@
  from math import pi, sqrt, tanh
  
  import kwant
-@@ -100,22 +101,40 @@
+@@ -103,22 +104,40 @@
          smatrix = kwant.smatrix(sys, energy)
          data.append(smatrix.transmission(0, 1))
  
@@ -57,7 +57,7 @@
  
  
  def main():
-@@ -127,8 +146,11 @@
+@@ -130,8 +149,11 @@
      def family_colors(site):
          return 0 if site.family == a else 1
  
@@ -71,7 +71,7 @@
  
      # Compute some eigenvalues.
      compute_evs(sys.finalized())
-@@ -137,9 +159,11 @@
+@@ -140,9 +162,11 @@
      for lead in leads:
          sys.attach_lead(lead)
  
diff --git a/doc/source/images/plot_graphene.py.diff b/doc/source/images/plot_graphene.py.diff
index 15cd417cde2b3c15cdf0d51a50b95ced753f7729..21ca11e0632f359f4fdbca2ce2e7845044e05da4 100644
--- a/doc/source/images/plot_graphene.py.diff
+++ b/doc/source/images/plot_graphene.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -6,6 +6,7 @@
+@@ -9,6 +9,7 @@
  # --------------------------
  #  - demonstrate different ways of plotting
  
@@ -8,7 +8,7 @@
  import kwant
  from matplotlib import pyplot
  
-@@ -29,9 +30,11 @@
+@@ -32,9 +33,11 @@
  
  
  def plot_system(sys):
@@ -23,7 +23,7 @@
  
      # use color and linewidths to get a better plot
      def family_color(site):
-@@ -40,7 +43,11 @@
+@@ -43,7 +46,11 @@
      def hopping_lw(site1, site2):
          return 0.04 if site1.family == site2.family else 0.1
  
@@ -36,7 +36,7 @@
  
  
  def plot_data(sys, n):
-@@ -55,7 +62,11 @@
+@@ -58,7 +65,11 @@
      # the usual - works great in general, looks just a bit crufty for
      # small systems
  
@@ -49,7 +49,7 @@
  
      # use two different sort of triangles to cleanly fill the space
      def family_shape(i):
-@@ -65,15 +76,22 @@
+@@ -68,15 +79,22 @@
      def family_color(i):
          return 'black' if sys.site(i).family == a else 'white'
  
diff --git a/doc/source/images/plot_zincblende.py.diff b/doc/source/images/plot_zincblende.py.diff
index 2f5c24db91feeded322dd08ceada96e0401cd3e3..ba55ad129228680f5c12ec2177db4ba6aec912f6 100644
--- a/doc/source/images/plot_zincblende.py.diff
+++ b/doc/source/images/plot_zincblende.py.diff
@@ -1,11 +1,14 @@
 --- original
 +++ modified
-@@ -1,3 +1,4 @@
+@@ -9,6 +9,7 @@
+ # --------------------------
+ #  - demonstrate different ways of plotting in 3D
+ 
 +import _defs
  import kwant
  from matplotlib import pyplot
  
-@@ -22,7 +23,10 @@
+@@ -33,7 +34,10 @@
      # checking shapes:
      sys = make_cuboid()
  
@@ -17,7 +20,7 @@
  
      # visualize the crystal structure better for a very small system
      sys = make_cuboid(a=1.5, b=1.5, c=1.5)
-@@ -30,8 +34,12 @@
+@@ -41,8 +45,12 @@
      def family_colors(site):
          return 'r' if site.family == a else 'g'
  
diff --git a/doc/source/images/quantum_well.py.diff b/doc/source/images/quantum_well.py.diff
index 0d6c0fa74c744972139a993f2d766079d0b11429..c7eed0467c064ff14e9ae3af18beb1c636689769 100644
--- a/doc/source/images/quantum_well.py.diff
+++ b/doc/source/images/quantum_well.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -6,6 +6,7 @@
+@@ -9,6 +9,7 @@
  # --------------------------
  #  - Functions as values in Builder
  
@@ -8,7 +8,7 @@
  import kwant
  
  # For plotting
-@@ -52,19 +53,25 @@
+@@ -55,19 +56,25 @@
          smatrix = kwant.smatrix(sys, energy, args=[-welldepth])
          data.append(smatrix.transmission(1, 0))
  
diff --git a/doc/source/images/quantum_wire.py.diff b/doc/source/images/quantum_wire.py.diff
index 3edc8b0bb262a3ff10bf4714bf3aebb57f314d50..2b39e15d4a177f1818215e8dc42087f0d6e74e19 100644
--- a/doc/source/images/quantum_wire.py.diff
+++ b/doc/source/images/quantum_wire.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -8,6 +8,7 @@
+@@ -11,6 +11,7 @@
  #  - Making scattering region and leads
  #  - Using the simple sparse solver for computing Landauer conductance
  
@@ -8,7 +8,7 @@
  from matplotlib import pyplot
  import kwant
  
-@@ -66,7 +67,10 @@
+@@ -69,7 +70,10 @@
  sys.attach_lead(right_lead)
  
  # Plot it, to make sure it's OK
@@ -20,7 +20,7 @@
  
  # Finalize the system
  sys = sys.finalized()
-@@ -87,8 +91,13 @@
+@@ -90,8 +94,13 @@
  
  # Use matplotlib to write output
  # We should see conductance steps
diff --git a/doc/source/images/spin_orbit.py.diff b/doc/source/images/spin_orbit.py.diff
index 14b9d53b00647b0ebebf37fa3c117a931f579ed7..50907520b6ab700bf7b3bcea8991c521cb980496 100644
--- a/doc/source/images/spin_orbit.py.diff
+++ b/doc/source/images/spin_orbit.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -10,6 +10,7 @@
+@@ -13,6 +13,7 @@
  # --------------------------
  #  - Numpy matrices as values in Builder
  
@@ -8,7 +8,7 @@
  import kwant
  
  # For plotting
-@@ -67,19 +68,24 @@
+@@ -70,19 +71,24 @@
          smatrix = kwant.smatrix(sys, energy)
          data.append(smatrix.transmission(1, 0))
  
diff --git a/doc/source/images/superconductor_band_structure.py.diff b/doc/source/images/superconductor_band_structure.py.diff
index 5fac2e20f32d47e76ca792eafaf956c8b07a62e9..9d62d435f9862f519d173da7844e3a7eb08eef38 100644
--- a/doc/source/images/superconductor_band_structure.py.diff
+++ b/doc/source/images/superconductor_band_structure.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -10,6 +10,7 @@
+@@ -13,6 +13,7 @@
  #  - Main motivation is to contrast to the implementation of superconductivity
  #    in tutorial5b.py
  
@@ -8,7 +8,7 @@
  import kwant
  
  import numpy as np
-@@ -46,11 +47,20 @@
+@@ -49,11 +50,20 @@
      # Make system and finalize it right away.
      lead = make_lead().finalized()
  
diff --git a/doc/source/images/superconductor_transport.py.diff b/doc/source/images/superconductor_transport.py.diff
index 3fd835a354b7b677a0fd7ebf6667340db2817350..2a2501efdc1f093a12a463d7071d14801107ab8c 100644
--- a/doc/source/images/superconductor_transport.py.diff
+++ b/doc/source/images/superconductor_transport.py.diff
@@ -1,6 +1,6 @@
 --- original
 +++ modified
-@@ -7,6 +7,7 @@
+@@ -10,6 +10,7 @@
  # - Implementing electron and hole ("orbital") degrees of freedom
  #   using different lattices
  
@@ -8,7 +8,7 @@
  import kwant
  
  # For plotting
-@@ -82,19 +83,24 @@
+@@ -85,19 +86,24 @@
                      smatrix.transmission(0, 0) +
                      smatrix.transmission(1, 0))