def display_graphic(self, flag_curves, ui):
ui.graphic_widget.canvas.picture.clear()<EOL>x = scipy.linspace(self.x_data[<NUM_LIT:0>], self.x_data[-<NUM_LIT:1>], len(self.x_data))  <EOL>curve_wanted = <NUM_LIT:0>  <EOL>for curve in self.y_data:<EOL><INDENT>if flag_curves:<EOL><INDENT>if curve_wanted == self.num_plot:  <EOL><INDENT>ui.graphic_widget.canvas.picture.plot(x, curve, '<STR_LIT>',<EOL>label='<STR_LIT>'.format(str(curve_wanted + <NUM_LIT:1>),<EOL>str(len(self.y_data))),<EOL>linewidth=<NUM_LIT:4>)<EOL><DEDENT>else:<EOL><INDENT>ui.graphic_widget.canvas.picture.plot(x, curve, '<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if curve_wanted == self.num_plot:<EOL><INDENT>ui.graphic_widget.canvas.picture.plot(x, curve, '<STR_LIT>',<EOL>label='<STR_LIT>'.format(str(curve_wanted + <NUM_LIT:1>),<EOL>str(len(self.y_data))))<EOL><DEDENT><DEDENT>curve_wanted += <NUM_LIT:1><EOL><DEDENT>ui.graphic_widget.canvas.picture.set_title('<STR_LIT>')<EOL>ui.graphic_widget.canvas.picture.set_xlabel('<STR_LIT>')<EOL>ui.graphic_widget.canvas.picture.set_ylabel('<STR_LIT>')<EOL>self.legend = ui.graphic_widget.canvas.picture.legend()  <EOL>ui.graphic_widget.canvas.picture.legend(bbox_to_anchor=(<NUM_LIT>, <NUM_LIT>))<EOL>ui.graphic_widget.canvas.draw()<EOL>
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.