Print the number of steps read in by plot_image.py (for sanity checks).
authorW. Trevor King <wking@drexel.edu>
Thu, 23 Feb 2012 20:05:57 +0000 (15:05 -0500)
committerW. Trevor King <wking@tremily.us>
Fri, 22 Feb 2013 17:11:10 +0000 (09:11 -0800)
src/plot_image/plot_image.py

index dd772a0476c21d4d6cd8786666101956d27c1a46..11a3a9787b4a8b0aadf2b6718570a28b951008ff 100755 (executable)
@@ -204,8 +204,8 @@ def main(argv=None):
     Title:             Some like it hot
     Image size:        5 2
     False color
-    X range:           0 4
-    X range:           0 1
+    X range:           0 4 (6 steps)
+    Y range:           0 1 (3 steps)
     Z range:           0.0 9.0
     >>> img = o.read()
     >>> img.startswith('\\x89PNG')
@@ -286,8 +286,10 @@ def main(argv=None):
 
     Z_min = numpy.min(Z.flat)
     Z_max = numpy.max(Z.flat)
-    print 'X range:          ', X[0,0], X[0,-2]
-    print 'X range:          ', Y[0,0], Y[-2,0]
+    print 'X range:           {} {} ({} steps)'.format(
+        X[0,0], X[0,-2], X.shape[1])
+    print 'Y range:           {} {} ({} steps)'.format(
+        Y[0,0], Y[-2,0], Y.shape[0])
     print 'Z range:          ', Z_min, Z_max
 
     fig = plot(X, Y, Z, full=options.full, title=options.title,