Skip to content

Commit 1833a43

Browse files
committed
updated command line option variable types
1 parent 7079a4d commit 1833a43

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

bin/hist.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ def plot_hist(f, height=20, bincount=None, pch="o", colour="white", title=""):
7676

7777
print " "*(nlen+1) + "-"*len(xs)
7878

79+
print
80+
print "-"*25
81+
print "|" + "Summary".center(23) + "|"
82+
print "-"*25
83+
summary = "|" + ("observations: %d" % n).center(23) + "|\n"
84+
summary += "|" + ("min value: %f" % min_val).center(23) + "|\n"
85+
summary += "|" + ("max value: %f" % max_val).center(23) + "|\n"
86+
summary += "-"*25
87+
print summary
7988
# for i in range(0, nlen):
8089
# printcolor(" "*(nlen+1), True, colour)
8190
# for x in range(0, len(hist)):
@@ -98,9 +107,9 @@ def plot_hist(f, height=20, bincount=None, pch="o", colour="white", title=""):
98107
parser.add_option('-t', '--title', help='title for the chart',
99108
default="", dest='t')
100109
parser.add_option('-b', '--bins', help='number of bins in the histogram',
101-
default=None, dest='b')
110+
type='int', default=None, dest='b')
102111
parser.add_option('-s', '--height', help='height of the histogram (in lines)',
103-
default=20, dest='h')
112+
type='int', default=20, dest='h')
104113
parser.add_option('-p', '--pch', help='shape of each bar', default='o', dest='p')
105114
parser.add_option('-c', '--colour', help='colour of the plot (%s)' % ", ".join(bcolours.keys()),
106115
default='white', dest='colour')

0 commit comments

Comments
 (0)