diff options
author | Guido van Rossum <guido@python.org> | 1997-09-09 03:39:21 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-09-09 03:39:21 +0000 |
commit | d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8 (patch) | |
tree | db4a6e4835e04851df721eb4595d7172d8e05c34 /Lib/stdwin/Histogram.py | |
parent | 045e688f6fc06c87cc93f84e42fb4767a04ba559 (diff) | |
download | cpython-git-d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8.tar.gz |
These directories renamed: tkinter -> lib-tk, stdwin -> lib-stdwin.
Diffstat (limited to 'Lib/stdwin/Histogram.py')
-rwxr-xr-x | Lib/stdwin/Histogram.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Lib/stdwin/Histogram.py b/Lib/stdwin/Histogram.py deleted file mode 100755 index 74a75f374f..0000000000 --- a/Lib/stdwin/Histogram.py +++ /dev/null @@ -1,36 +0,0 @@ -# Module 'Histogram' - -from Buttons import * - -# A Histogram displays a histogram of numeric data. -# -class HistogramAppearance(LabelAppearance, Define): - # - def define(self, parent): - Define.define(self, (parent, '')) - self.ydata = [] - self.scale = (0, 100) - return self - # - def setdata(self, ydata, scale): - self.ydata = ydata - self.scale = scale # (min, max) - self.parent.change(self.bounds) - # - def drawpict(self, d): - (left, top), (right, bottom) = self.bounds - min, max = self.scale - size = max-min - width, height = right-left, bottom-top - ydata = self.ydata - npoints = len(ydata) - v1 = top + height # constant - h1 = left # changed in loop - for i in range(npoints): - h0 = h1 - v0 = top + height - (ydata[i]-min)*height/size - h1 = left + (i+1) * width/npoints - d.paint((h0, v0), (h1, v1)) - # - -class Histogram(NoReactivity, HistogramAppearance): pass |