From dec7e77a0d4a7ce985b775abeffa427e27f2c9f4 Mon Sep 17 00:00:00 2001
From: Christoph Groth <christoph.groth@cea.fr>
Date: Fri, 19 Apr 2013 12:23:31 +0200
Subject: [PATCH] fix plotter.map shape calculation

---
 kwant/plotter.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kwant/plotter.py b/kwant/plotter.py
index 2ce80731..ae4371cc 100644
--- a/kwant/plotter.py
+++ b/kwant/plotter.py
@@ -757,7 +757,7 @@ def mask_interpolate(coords, values, a=None, method='nearest', oversampling=3):
     elif a <= 0:
         raise ValueError("The distance a must be strictly positive.")
 
-    shape = (((cmin - cmax) / a + 1) * oversampling).round()
+    shape = (((cmax - cmin) / a + 1) * oversampling).round()
     delta = 0.5 * (oversampling - 1) * a / oversampling
     cmin -= delta
     cmax += delta
-- 
GitLab