added docstrings for API methods
This commit is contained in:
@ -87,12 +87,21 @@ class MainWindow(QMainWindow):
|
||||
# Remote API calls
|
||||
|
||||
def new_plot(self, name, cfg):
|
||||
"""
|
||||
Create a new plot <name> using the configuration dict <cfg>.
|
||||
The configuration is forwarded to the constructor of PlotDescription.
|
||||
Allowed keys are: title, xlabel, ylabel, xs, ys.
|
||||
"""
|
||||
desc = self.add_new_desc_to_list(name, cfg)
|
||||
if self.menu_settings.checkboxes["Open new plots"].isChecked():
|
||||
if not self.mdi.findSubWindow(name):
|
||||
self.sig_make_new_plot.emit(name, desc)
|
||||
|
||||
def append_data(self, name, point):
|
||||
"""
|
||||
Append a new data point <point> to the (existing) plot <name>.
|
||||
The point is forwarded to the append method of PlotDescription.
|
||||
"""
|
||||
item = self.lst.get(name)
|
||||
desc = item.value
|
||||
desc.append(point)
|
||||
|
Reference in New Issue
Block a user