expose comparison plot canvas as property

This commit is contained in:
markus 2020-11-17 10:51:49 +01:00 committed by Phil Elson
parent 32e1548e2f
commit e0923d2e83

View file

@ -474,7 +474,7 @@ class ExpertApplication:
@property
def widget(self):
self.comparison_view.update_plot()
return widgets.VBox(children=(self.tab_widget, self.comparison_view.figure.canvas))
return widgets.VBox(children=(self.tab_widget, self.comparison_view.widget))
class ComparisonView:
@ -517,6 +517,10 @@ class ComparisonView:
self.figure.canvas.draw()
@property
def widget(self):
return self.figure.canvas
def tuple_without_index(t: typing.Tuple, index: int) -> typing.Tuple:
return t[:index] + t[index + 1:]