diff --git a/doc/source/images/ab_ring.py.diff b/doc/source/images/ab_ring.py.diff
index bacb520123f3c4583447ee9114e3aa06dcb39452..7bb4c59b77bd9b5800031a959d458c68b9ee4b4a 100644
--- a/doc/source/images/ab_ring.py.diff
+++ b/doc/source/images/ab_ring.py.diff
@@ -8,27 +8,7 @@
  from cmath import exp
  from math import pi
  
-@@ -40,12 +41,13 @@
-     sys[lat.shape(ring, (0, r1 + 1))] = 4 * t
-     sys[lat.neighbors()] = -t
- 
--    # In order to introduce a flux through the ring, we introduce a phase on
--    # the hoppings on the line cut through one of the arms.  Since we want to
--    # change the flux without modifying the Builder instance repeatedly, we
--    # define the modified hoppings as a function that takes the flux as its
--    # parameter phi.
--    def fluxphase(site1, site2, phi):
-+    # In order to introduce a flux through the ring, we introduce a phase
-+    # on the hoppings on the line cut through one of the arms
-+
-+    # since we want to change the flux without modifying Builder repeatedly,
-+    # we define the modified hoppings as a function that takes the flux
-+    # through the argument phi.
-+    def fluxphase(site1, site2, phi=0):
-         return exp(1j * phi)
- 
-     def crosses_branchcut(hop):
-@@ -81,6 +83,50 @@
+@@ -81,6 +82,50 @@
      return sys
  
  
@@ -79,7 +59,7 @@
  def plot_conductance(sys, energy, fluxes):
      # compute conductance
  
-@@ -90,18 +136,31 @@
+@@ -90,18 +135,31 @@
          smatrix = kwant.smatrix(sys, energy, args=[flux])
          data.append(smatrix.transmission(1, 0))
  
@@ -116,7 +96,7 @@
  
      # Finalize the system.
      sys = sys.finalized()
-@@ -111,6 +170,17 @@
+@@ -111,6 +169,17 @@
                                                  for i in xrange(100)])