def enable_widgets(self):
        if not self.enabled:
            self.class_graph_1 = Graph(self.class_graph_1,
                                       'class',
                                       interval_lines=False,
                                       label='Classes #1')
            self.class_graph_2 = Graph(self.class_graph_2,
                                       'class',
                                       interval_lines=False,
                                       label='Classes #2')
            self.class_graph_3 = Graph(self.class_graph_3,
                                       'class',
                                       interval_lines=False,
                                       label='Classes #3')
            self.attribute_graph = Graph(self.attribute_graph,
                                         'attribute',
                                         interval_lines=False)

            # self.deep_rep_button.setEnabled(True)
            self.network_comboBox.setEnabled(True)

            self.enabled = True

        self.class_graph_1.setup()
        self.class_graph_2.setup()
        self.class_graph_3.setup()
        self.attribute_graph.setup()

        self.reload()
        self.enable_annotate_button()
        self.enable_load_button()

        self.deep_rep_checkBox.setEnabled(False)
        self.deep_rep_checkBox.setChecked(False)
        self.deep_rep_files = []
예제 #2
0
    def enable_widgets(self):
        self.before_lineEdit.setValidator(
            QtGui.QIntValidator(0, g.data.number_samples))
        self.after_lineEdit.setValidator(
            QtGui.QIntValidator(0, g.data.number_samples))

        self.class_graph = Graph(plot_widget=self.class_graph,
                                 graph_type="class",
                                 label="Classes",
                                 interval_lines=True)
        self.class_graph.setup()

        self.distance_graph = Graph(self.distance_graph,
                                    'data',
                                    label="score",
                                    interval_lines=True,
                                    unit="",
                                    AutoSIPrefix=False,
                                    y_range=(0, 1))
        self.distance_graph.setup()

        self.distance_histogram = Graph(self.distance_histogram,
                                        "histogram",
                                        label="histogram",
                                        play_line=True)
        self.distance_histogram.setup()

        self.reload()
    def enable_widgets(self):
        """"""

        if not self.was_enabled_once:
            self.class_graph = Graph(self.class_graph,
                                     'class',
                                     interval_lines=False)
            self.was_enabled_once = True

        self.split_at_lineEdit.setValidator(
            QtGui.QIntValidator(0, g.data.number_samples + 1))
        self.move_start_lineEdit.setValidator(
            QtGui.QIntValidator(0, g.data.number_samples + 1))
        self.move_end_lineEdit.setValidator(
            QtGui.QIntValidator(0, g.data.number_samples + 1))

        self.class_graph.setup()
        self.class_graph.reload_classes(g.windows.windows)

        self.reload()
예제 #4
0
    def show_graphs(self, dataset, y_axis):
        graphs = []
        dlg = PlotDialog(None, 9)
        dlg.setWindowTitle("Graph")
        plots = dlg.graph_widgets()

        class_graph = Graph(plots[0], "class", interval_lines=False)
        class_graph.setup()
        class_graph.reload_classes(g.windows.windows)
        graphs.append(class_graph)

        for i in range(0, len(g.classes)):
            heatmap_data = dataset.make_heatmap(i, True)
            plots[i +
                  1].setTitle(f'<font size="6"><b>{g.classes[i]}</b></font>')
            # plots[i + 1].setYRange(0, 1)
            # legend = plot.addLegend(offset=(-10, 15), labelTextSize='20pt')
            plots[i + 1].getAxis('left').setLabel(y_axis)
            plots[i + 1].plot(heatmap_data)
            dlg.showMaximized()
            graphs.append(dlg)
        return graphs