gui/matplotlibwidgetFile.py
def display_graphic(self, flag_curves, ui):
        """
        This function plots results of a file into the canvas.
        Inputs : flag_curves : A boolean to know with we have to plot all curves or not.
                 ui : The main_Window.
        """
        ui.graphic_widget.canvas.picture.clear()

        x = scipy.linspace(self.x_data[0], self.x_data[-1], len(self.x_data))  #X-axis

        curve_wanted = 0  #Iterator on lines of y_data
        for curve in self.y_data:
            if flag_curves:
                if curve_wanted == self.num_plot:  #If the iterator is equal of the slider's value, this curve is different
                    ui.graphic_widget.canvas.picture.plot(x, curve, '-r',
                                                          label='Case : {0}/{1}'.format(str(curve_wanted + 1),
                                                                                        str(len(self.y_data))),
                                                          linewidth=4)
                else:
                    ui.graphic_widget.canvas.picture.plot(x, curve, '0.75')
            else:
                if curve_wanted == self.num_plot:
                    ui.graphic_widget.canvas.picture.plot(x, curve, '-r',
                                                          label='Case : {0}/{1}'.format(str(curve_wanted + 1),
                                                                                        str(len(self.y_data))))
            curve_wanted += 1

        ui.graphic_widget.canvas.picture.set_title('Rrs.csv')
        ui.graphic_widget.canvas.picture.set_xlabel('Wavelength (${nm}$)')
        ui.graphic_widget.canvas.picture.set_ylabel('Reflectance ($Sr^{-1}$)')
        self.legend = ui.graphic_widget.canvas.picture.legend()  #Display in a legend curves's labels.
        ui.graphic_widget.canvas.picture.legend(bbox_to_anchor=(1.1, 1.05))

        ui.graphic_widget.canvas.draw()
def display_graphic(self, flag_curves, ui):
        """
        This function plots results of a file into the canvas.
        Inputs : flag_curves : A boolean to know with we have to plot all curves or not.
                 ui : The main_Window.
        """
        ui.graphic_widget.canvas.picture.clear()

        x = scipy.linspace(self.x_data[0], self.x_data[-1], len(self.x_data))  #X-axis

        curve_wanted = 0  #Iterator on lines of y_data
        for curve in self.y_data:
            if flag_curves:
                if curve_wanted == self.num_plot:  #If the iterator is equal of the slider's value, this curve is different
                    ui.graphic_widget.canvas.picture.plot(x, curve, '-r',
                                                          label='Case : {0}/{1}'.format(str(curve_wanted + 1),
                                                                                        str(len(self.y_data))),
                                                          linewidth=4)
                else:
                    ui.graphic_widget.canvas.picture.plot(x, curve, '0.75')
            else:
                if curve_wanted == self.num_plot:
                    ui.graphic_widget.canvas.picture.plot(x, curve, '-r',
                                                          label='Case : {0}/{1}'.format(str(curve_wanted + 1),
                                                                                        str(len(self.y_data))))
            curve_wanted += 1

        ui.graphic_widget.canvas.picture.set_title('Rrs.csv')
        ui.graphic_widget.canvas.picture.set_xlabel('Wavelength (${nm}$)')
        ui.graphic_widget.canvas.picture.set_ylabel('Reflectance ($Sr^{-1}$)')
        self.legend = ui.graphic_widget.canvas.picture.legend()  #Display in a legend curves's labels.
        ui.graphic_widget.canvas.picture.legend(bbox_to_anchor=(1.1, 1.05))

        ui.graphic_widget.canvas.draw()
This function plots results of a file into the canvas.
        Inputs : flag_curves : A boolean to know with we have to plot all curves or not.
                 ui : The main_Window.