From 0db3915ae8dd2fe3e4cff74087c36b6bbfeec488 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 23 Feb 2012 15:05:57 -0500 Subject: [PATCH] Print the number of steps read in by plot_image.py (for sanity checks). --- src/plot_image/plot_image.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plot_image/plot_image.py b/src/plot_image/plot_image.py index dd772a0..11a3a97 100755 --- a/src/plot_image/plot_image.py +++ b/src/plot_image/plot_image.py @@ -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, -- 2.26.2