The navigator now displays the plots and data in a tree that shows the ancestry information.
This commit is contained in:
@@ -161,13 +161,17 @@ class LargeView (gtk.Frame):
|
||||
|
||||
class Plot (gtk.Frame):
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, title):
|
||||
gtk.Frame.__init__(self)
|
||||
self.mark_active(False)
|
||||
self.connect('button_press_event', self.on_button_press)
|
||||
self.sel_obj = None
|
||||
self.active = False
|
||||
|
||||
self.title = title
|
||||
|
||||
def get_title(self):
|
||||
return self.title
|
||||
|
||||
def on_button_press(self, *rest):
|
||||
# logger.log('debug', 'button pressed in plot')
|
||||
self.mark_active(True)
|
||||
@@ -188,7 +192,7 @@ class Plot (gtk.Frame):
|
||||
|
||||
class EmptyView (Plot):
|
||||
def __init__(self):
|
||||
Plot.__init__(self)
|
||||
Plot.__init__(self, 'Empty view')
|
||||
|
||||
label = gtk.Label('No view')
|
||||
ebox = gtk.EventBox()
|
||||
@@ -213,20 +217,22 @@ class EmptyView (Plot):
|
||||
|
||||
class SinePlot(Plot):
|
||||
def __init__(self):
|
||||
Plot.__init__(self)
|
||||
Plot.__init__(self, 'Sine plot')
|
||||
|
||||
fig = Figure(figsize=(5,4), dpi=72)
|
||||
ax = fig.add_subplot(111)
|
||||
t = arange(0.0,3.0,0.01)
|
||||
s = sin(2*pi*t)
|
||||
ax.plot(t,s)
|
||||
|
||||
self.canvas = FigureCanvas(fig)
|
||||
self.add(self.canvas)
|
||||
self.canvas.show()
|
||||
|
||||
|
||||
class ScatterPlot(Plot):
|
||||
def __init__(self, dataset, id_dim, sel_dim, id_1, id_2):
|
||||
Plot.__init__(self)
|
||||
def __init__(self, dataset,id_dim, sel_dim,id_1,id_2):
|
||||
Plot.__init__(self, 'Scatter plot')
|
||||
fig = Figure(figsize=(5,4), dpi=72)
|
||||
self.ax = ax = fig.add_subplot(111)
|
||||
self.current_dim = id_dim
|
||||
|
Reference in New Issue
Block a user