diff --git a/Examples/ff/SasPyramid4.py b/Examples/ff/SasPyramid4.py
index 4b29ec6d098af34003056512e18c91d400d3eb83..48ee8dc0494dacc4b6b148ce20c50b409441e325 100755
--- a/Examples/ff/SasPyramid4.py
+++ b/Examples/ff/SasPyramid4.py
@@ -2,10 +2,10 @@
 
 import bornagain as ba
 from bornagain import nm, deg
-import bornplot2 as bp
+import bornplot2 as bp2
 
 m_particle = ba.HomogeneousMaterial("Particle", 1e-5, 0)
-det = ba.SphericalDetector(200, 5*deg, 2.5*deg, 2.5*deg)
+npix = 200
 
 def simulate_at(omega):
     title = r'$\omega=%d^\circ$' % omega
@@ -14,10 +14,10 @@ def simulate_at(omega):
     particle = ba.Particle(m_particle, ff)
     particle.setRotation(ba.RotationZ(omega*deg))
 
-    result = bp.run_simulation_with_particle(det, particle)
-    return bp.NamedResult(result, title)
+    result = bp2.run_sas_with_particle(npix, particle)
+    return bp2.NamedResult(result, title)
 
 namedResults = [simulate_at(omega) for omega in [0, 30]]
 
-bp.make_plot_row(namedResults, det, "ff_Pyramid4")
+bp2.make_plot_row(namedResults, "ff_Pyramid4")
 # bp.save_results(namedResults, "ff_Pyramid4")
diff --git a/Examples/ff/bornplot2.py b/Examples/ff/bornplot2.py
index 053cbf3a1e8808b851177f201b16b5cbfb6ea3be..f35dbc27066e468a9eb4c9322694715287d213e4 100644
--- a/Examples/ff/bornplot2.py
+++ b/Examples/ff/bornplot2.py
@@ -12,6 +12,7 @@ mpl.rcParams['image.interpolation'] = 'none'
 
 import bornagain as ba
 from bornagain import deg, angstrom
+from bornagain import ba_plot as bp
 
 
 class NamedResult:
@@ -87,11 +88,11 @@ class MultiPlot:
         cb.set_label(r'$\left|F(q)\right|^2/V^{\,2}$', fontsize=self.fontsize)
 
 
-def make_plot_row(namedResults, det, name):
-    make_plot(namedResults, det, name, len(namedResults))
+def make_plot_row(namedResults, name):
+    make_plot(namedResults, name, len(namedResults))
 
 
-def make_plot(namedResults, det, name, ncol):
+def make_plot(namedResults, name, ncol):
     """
     Make a plot consisting of one detector image for each Result in results,
     plus one common color scale.
@@ -109,9 +110,10 @@ def make_plot(namedResults, det, name, ncol):
     for i in range(len(namedResults)):
         item = namedResults[i]
         ax = multiPlot.axes[i]
+        axes_limits = bp.get_axes_limits(item.result, ba.Axes.UNDEFINED)
         im = ax.imshow(item.result.array(),
                        norm=norm,
-                       extent=rectangle(det),
+                       extent=axes_limits,
                        aspect=1)
         ax.set_xlabel(r'$\phi_{\rm f} (^{\circ})$', fontsize=multiPlot.fontsize)
         if i % ncol == 0:
@@ -148,12 +150,13 @@ def sas_sample_with_particle(particle):
     return multi_layer
 
 
-def run_simulation_with_particle(det, particle):
+def run_sas_with_particle(npix, particle):
     """
     Run simulation and plot results
     """
     sample = sas_sample_with_particle(particle)
     beam = ba.Beam(1, 1*angstrom, ba.Direction(1e-8*deg, 0))
+    det = ba.SphericalDetector(npix, 5*deg, 2.5*deg, 2.5*deg)
     simulation = ba.ScatteringSimulation(beam, sample, det)
     simulation.runSimulation()
     return simulation.result()