diff --git a/plotting.py b/plotting.py
index a8f9bcae683e22d4880a860e81baf736a936ae36..53a9ccfd5f334af99b86c9e5022c860bed8dd70f 100644
--- a/plotting.py
+++ b/plotting.py
@@ -28,7 +28,12 @@ class Multiplot:
     def index(self, i):
         row = int(i / self.cols)
         col = i - row * self.cols
-        return row, col
+        if self.rows == 1:
+            return col
+        if self.cols == 1:
+            return row
+        else:
+            return row, col
 
 
 def saveplot(f):