Added line plot of matrices.
This commit is contained in:
parent
7ee7f0cf7e
commit
c26999e688
|
@ -240,6 +240,11 @@ class NavigatorMenu(gtk.Menu):
|
||||||
self.plot_menu.append(self.plot_scatter_item)
|
self.plot_menu.append(self.plot_scatter_item)
|
||||||
self.plot_scatter_item.show()
|
self.plot_scatter_item.show()
|
||||||
|
|
||||||
|
self.plot_line_item = gtk.MenuItem('Line view')
|
||||||
|
self.plot_line_item.connect('activate', self.on_plot_line, navigator)
|
||||||
|
self.plot_menu.append(self.plot_line_item)
|
||||||
|
self.plot_line_item.show()
|
||||||
|
|
||||||
self.plot_item = gtk.MenuItem('Plot')
|
self.plot_item = gtk.MenuItem('Plot')
|
||||||
self.append(self.plot_item)
|
self.append(self.plot_item)
|
||||||
self.plot_item.set_submenu(self.plot_menu)
|
self.plot_item.set_submenu(self.plot_menu)
|
||||||
|
@ -334,6 +339,17 @@ class NavigatorMenu(gtk.Menu):
|
||||||
plot.set_selection_listener(project.set_selection)
|
plot.set_selection_listener(project.set_selection)
|
||||||
project._selection_observers.append(plot)
|
project._selection_observers.append(plot)
|
||||||
|
|
||||||
|
def on_plot_line(self, item, navigator):
|
||||||
|
project = main.project
|
||||||
|
ds = self.dataset
|
||||||
|
dims = ds.get_dim_name()
|
||||||
|
ids = ds.get_identifiers(dims[1])
|
||||||
|
plot = plots.LineViewPlot(ds, name='Line (%s)' % ds.get_name())
|
||||||
|
icon = fluents.icon_factory.get("line_plot")
|
||||||
|
project.data_tree_insert(self.tree_iter, 'Line view', plot, None, "black", icon)
|
||||||
|
plot.set_selection_listener(project.set_selection)
|
||||||
|
project._selection_observers.append(plot)
|
||||||
|
|
||||||
def on_transpose(self, item, navigator):
|
def on_transpose(self, item, navigator):
|
||||||
project = main.project
|
project = main.project
|
||||||
ds = self.dataset.transpose()
|
ds = self.dataset.transpose()
|
||||||
|
|
|
@ -1135,6 +1135,20 @@ class PlotThresholder:
|
||||||
self.set_threshold(min, max)
|
self.set_threshold(min, max)
|
||||||
|
|
||||||
|
|
||||||
|
#class PlotContextMenu(gtk.Menu):
|
||||||
|
# def __init__(self, plot):
|
||||||
|
# gtk.Menu(self)
|
||||||
|
# self._plot = plot
|
||||||
|
#
|
||||||
|
# # Populate main menu
|
||||||
|
## self.color_item = gtk.MenuItem('Color')
|
||||||
|
# self.append(self.color_item)
|
||||||
|
# self.color_item.set_submenu(self.build_dataset_menu()):
|
||||||
|
#
|
||||||
|
# def build_dataset_menu(self):
|
||||||
|
# return gtk.Menu()
|
||||||
|
|
||||||
|
|
||||||
# Create zoom-changed signal
|
# Create zoom-changed signal
|
||||||
gobject.signal_new('zoom-changed', Plot, gobject.SIGNAL_RUN_LAST, None,
|
gobject.signal_new('zoom-changed', Plot, gobject.SIGNAL_RUN_LAST, None,
|
||||||
(gobject.TYPE_PYOBJECT,))
|
(gobject.TYPE_PYOBJECT,))
|
||||||
|
|
Reference in New Issue