Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Added simple histogram

This commit is contained in:
Arnar Flatberg 2007-01-17 15:40:33 +00:00
parent 1ffbf4f9e7
commit 7c20e6d780
1 changed files with 23 additions and 0 deletions

View File

@ -832,6 +832,29 @@ class ImagePlot(Plot):
def get_toolbar(self):
return self._toolbar
class HistogramPlot(Plot):
def __init__(self, dataset, **kw):
self.dataset = dataset
self.keywords = kw
Plot.__init__(self, kw['name'])
self.ax = self.fig.add_subplot(111)
#self.ax.set_xticks([])
#self.ax.set_yticks([])
self.ax.grid(False)
# FIXME: ax shouldn't be in kw at all
# Initial draw
self.ax.hist(dataset.asarray(), bins=20)
# Add canvas and show
self.add(self.canvas)
self.canvas.show()
def get_toolbar(self):
return self._toolbar
class NetworkPlot(Plot):
def __init__(self, dataset, **kw):