Added LICENCE (the pure GPL text copied verbatim from gnu.org) and README.
Started to add a NetworkX plot in plots.py
This commit is contained in:
@@ -498,6 +498,28 @@ class ScatterPlot(Plot):
|
||||
self.ax.plot(xdata_new,ydata_new,'or')
|
||||
self.canvas.draw()
|
||||
|
||||
class NetworkPlot(Plot):
|
||||
def __init__(self, dataset, name='Network Plot'):
|
||||
Plot.__init__(self)
|
||||
|
||||
fig = Figure(figsize=(5,4), dpi=72)
|
||||
self.ax = ax = fig.add_subplot(111)
|
||||
|
||||
self.canvas = FigureCanvas(fig)
|
||||
self.add(self.canvas)
|
||||
self.canvas.show()
|
||||
|
||||
self._toolbar = NavToolbar(self.canvas, None)
|
||||
self._toolbar.set_property('show-arrow', False)
|
||||
self._toolbar.set_select_callback(self.rectangle_select_callback)
|
||||
|
||||
def get_toolbar(self):
|
||||
return self._toolbar
|
||||
|
||||
def selection_changed(self, selection):
|
||||
return None
|
||||
|
||||
|
||||
# Create a view-changed signal that should be emitted every time
|
||||
# the active view changes.
|
||||
gobject.signal_new('view-changed', MainView, gobject.SIGNAL_RUN_LAST,
|
||||
|
Reference in New Issue
Block a user