mirror of https://gitlab.com/pamhyr/pamhyr2
45 lines
896 B
Python
45 lines
896 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
class APlot(object):
|
|
def __init__(self, canvas=None, data=None, toolbar=None):
|
|
super(APlot, self).__init__()
|
|
|
|
self._canvas = canvas
|
|
self._data = data
|
|
self._toolbar = toolbar
|
|
|
|
@property
|
|
def canvas(self):
|
|
return self._canvas
|
|
|
|
@property
|
|
def data(self):
|
|
return self._data
|
|
|
|
@property
|
|
def toolbar(self):
|
|
return self._toolbar
|
|
|
|
def draw(self):
|
|
"""Draw plot
|
|
|
|
Returns:
|
|
Nothing
|
|
"""
|
|
raise NotImplementedMethodeError(self, self.draw)
|
|
|
|
|
|
def update(self, ind = None):
|
|
"""Update plot
|
|
|
|
Update the plot, update for data index IND if define, else
|
|
update all the plot
|
|
|
|
Args:
|
|
ind: Data index to update
|
|
|
|
Returns:
|
|
Nothing
|
|
"""
|
|
raise NotImplementedMethodeError(self, self.update)
|