def test(): app = QApplication([]) w = OWVennDiagram() data = Orange.data.Table("brown-selected") data.domain.addmetas({-42: Orange.feature.String("Test")}) for i, inst in enumerate(data): inst[-42] = "{}".format(i % 30) random = Orange.misc.Random() indices = Orange.data.sample.SubsetIndices2( p0=0.7, random_generator=random) d1 = data.select(indices(data)) d2 = data.select(indices(data)) d3 = data.select(indices(data)) d4 = data.select(indices(data)) d5 = data.select(indices(data)) n = 5 for i, data in zip(range(n), [d1, d2, d3, d4, d5]): data.name = chr(ord("A") + i) w.setData(data, key=i) w.handleNewSignals() w.show() app.exec_() del w app.processEvents() return app
def test1(): app = QApplication([]) w = OWVennDiagram() data1 = Orange.data.Table("brown-selected") data2 = Orange.data.Table("brown-selected") w.setData(data1, 1) w.setData(data2, 2) w.handleNewSignals() w.show() app.exec_() del w return app