From: W. Trevor King Date: Thu, 23 Feb 2012 20:05:57 +0000 (-0500) Subject: Print the number of steps read in by plot_image.py (for sanity checks). X-Git-Url: http://git.tremily.us/?p=parallel_computing.git;a=commitdiff_plain;h=19a55b761dc0f328d1efd185eaa0f50d6f7b2f4e Print the number of steps read in by plot_image.py (for sanity checks). --- 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,