def plot(self, y_axis='<STR_LIT>', x_axis='<STR_LIT>',<EOL>logx=False, logy=False,<EOL>mixed=True, all_layers=False, all_elements=False,<EOL>all_isotopes=False, items_to_plot=None,<EOL>time_unit='<STR_LIT>', offset_us=<NUM_LIT:0.>, source_to_detector_m=<NUM_LIT>,<EOL>time_resolution_us=<NUM_LIT>, t_start_us=<NUM_LIT:1>,<EOL>plotly=False, ax_mpl=None,<EOL>fmt='<STR_LIT:->', ms='<STR_LIT:2>', lw='<STR_LIT>', alpha=<NUM_LIT:1>):<EOL>
if x_axis not in x_type_list:<EOL><INDENT>raise ValueError("<STR_LIT>".format(x_type_list))<EOL><DEDENT>if time_unit not in time_unit_list:<EOL><INDENT>raise ValueError("<STR_LIT>".format(time_unit_list))<EOL><DEDENT>if y_axis not in y_type_list:<EOL><INDENT>raise ValueError("<STR_LIT>".format(y_type_list))<EOL><DEDENT>_stack_signal = self.stack_signal<EOL>_stack = self.stack<EOL>_stack_sigma = self.stack_sigma<EOL>_x_axis = self.total_signal['<STR_LIT>']<EOL>x_axis_label = None<EOL>if ax_mpl is None:<EOL><INDENT>fig_mpl, ax_mpl = plt.subplots()<EOL><DEDENT>"""<STR_LIT>"""<EOL>if x_axis == '<STR_LIT>':<EOL><INDENT>x_axis_label = '<STR_LIT>'<EOL><DEDENT>if x_axis == '<STR_LIT>':<EOL><INDENT>x_axis_label = u"<STR_LIT>"<EOL>_x_axis = _utilities.ev_to_angstroms(array=_x_axis)<EOL><DEDENT>if x_axis == '<STR_LIT:time>':<EOL><INDENT>if time_unit == '<STR_LIT:s>':<EOL><INDENT>x_axis_label = '<STR_LIT>'<EOL>_x_axis = _utilities.ev_to_s(array=_x_axis,<EOL>source_to_detector_m=source_to_detector_m,<EOL>offset_us=offset_us)<EOL><DEDENT>if time_unit == '<STR_LIT>':<EOL><INDENT>x_axis_label = '<STR_LIT>'<EOL>_x_axis = <NUM_LIT> * _utilities.ev_to_s(array=_x_axis,<EOL>source_to_detector_m=source_to_detector_m,<EOL>offset_us=offset_us)<EOL><DEDENT>if time_unit == '<STR_LIT>':<EOL><INDENT>x_axis_label = '<STR_LIT>'<EOL>_x_axis = <NUM_LIT> * _utilities.ev_to_s(array=_x_axis,<EOL>source_to_detector_m=source_to_detector_m,<EOL>offset_us=offset_us)<EOL><DEDENT>print("<STR_LIT>"<EOL>.format(x_axis_label, source_to_detector_m, offset_us))<EOL><DEDENT>if x_axis == '<STR_LIT>':<EOL><INDENT>x_axis_label = '<STR_LIT>'<EOL>_x_axis = _utilities.ev_to_image_number(array=_x_axis,<EOL>source_to_detector_m=source_to_detector_m,<EOL>offset_us=offset_us,<EOL>time_resolution_us=time_resolution_us,<EOL>t_start_us=t_start_us)<EOL>print("<STR_LIT>"<EOL>.format(x_axis_label, source_to_detector_m, offset_us, time_resolution_us))<EOL><DEDENT>if x_axis_label is None:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>"""<STR_LIT>"""<EOL>y_axis_tag = y_axis<EOL>if y_axis == '<STR_LIT>':<EOL><INDENT>y_axis_label = '<STR_LIT>'<EOL><DEDENT>elif y_axis == '<STR_LIT>':<EOL><INDENT>y_axis_label = '<STR_LIT>'<EOL><DEDENT>elif y_axis == '<STR_LIT>':<EOL><INDENT>y_axis_tag = '<STR_LIT>'<EOL>y_axis_label = '<STR_LIT>'<EOL><DEDENT>elif y_axis == '<STR_LIT>':<EOL><INDENT>y_axis_tag = '<STR_LIT>'<EOL>y_axis_label = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>y_axis_tag = '<STR_LIT>'<EOL>y_axis_label = "<STR_LIT>"<EOL><DEDENT>if y_axis_tag[:<NUM_LIT:5>] == '<STR_LIT>':<EOL><INDENT>mixed = False<EOL>all_layers = False<EOL>print("<STR_LIT>")<EOL>if y_axis_tag[-<NUM_LIT:3>:] == '<STR_LIT>':<EOL><INDENT>all_elements = False<EOL>print("<STR_LIT>")<EOL><DEDENT><DEDENT>if y_axis_tag == '<STR_LIT>':<EOL><INDENT>mixed = False<EOL>print("<STR_LIT>")<EOL><DEDENT>if mixed:<EOL><INDENT>_y_axis = self.total_signal[y_axis_tag]<EOL>ax_mpl.plot(_x_axis, _y_axis, fmt, ms=ms, lw=lw, alpha=alpha, label="<STR_LIT>")<EOL><DEDENT>if all_layers:<EOL><INDENT>for _compound in _stack.keys():<EOL><INDENT>_y_axis = _stack_signal[_compound][y_axis_tag]<EOL>ax_mpl.plot(_x_axis, _y_axis, fmt, ms=ms, lw=lw, alpha=alpha, label=_compound)<EOL><DEDENT><DEDENT>if all_elements:<EOL><INDENT>for _compound in _stack.keys():<EOL><INDENT>for _element in _stack[_compound]['<STR_LIT>']:<EOL><INDENT>if y_axis_tag[:<NUM_LIT:5>] != '<STR_LIT>':<EOL><INDENT>_y_axis = _stack_signal[_compound][_element][y_axis_tag]<EOL>ax_mpl.plot(_x_axis, _y_axis, fmt, ms=ms, lw=lw, alpha=alpha,<EOL>label="<STR_LIT>".format(_compound, _element))<EOL><DEDENT>else:<EOL><INDENT>_y_axis = _stack_sigma[_compound][_element]['<STR_LIT>']<EOL>ax_mpl.plot(_x_axis, _y_axis, fmt, ms=ms, lw=lw, alpha=alpha,<EOL>label="<STR_LIT>".format(_compound, _element))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if all_isotopes:<EOL><INDENT>for _compound in _stack.keys():<EOL><INDENT>for _element in _stack[_compound]['<STR_LIT>']:<EOL><INDENT>for _isotope in _stack[_compound][_element]['<STR_LIT>']['<STR_LIT:list>']:<EOL><INDENT>if y_axis_tag[:<NUM_LIT:5>] != '<STR_LIT>':<EOL><INDENT>_y_axis = _stack_signal[_compound][_element][_isotope][y_axis_tag]<EOL>ax_mpl.plot(_x_axis, _y_axis, fmt, ms=ms, lw=lw, alpha=alpha,<EOL>label="<STR_LIT>".format(_compound, _element, _isotope))<EOL><DEDENT>else:<EOL><INDENT>_y_axis = _stack_sigma[_compound][_element][_isotope][y_axis_tag]<EOL>ax_mpl.plot(_x_axis, _y_axis, fmt, ms=ms, lw=lw, alpha=alpha,<EOL>label="<STR_LIT>".format(_compound, _element, _isotope))<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>"""<STR_LIT>"""<EOL>if items_to_plot is not None:<EOL><INDENT>for _path_to_plot in items_to_plot:<EOL><INDENT>_path_to_plot = list(_path_to_plot)<EOL>if y_axis_tag[:<NUM_LIT:5>] != '<STR_LIT>':<EOL><INDENT>_live_path = _stack_signal<EOL><DEDENT>else:<EOL><INDENT>_len_of_path = len(_path_to_plot)<EOL>if y_axis_tag[-<NUM_LIT:3>:] == '<STR_LIT>':<EOL><INDENT>if _len_of_path < <NUM_LIT:3>:<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>y_axis_tag, _path_to_plot[-<NUM_LIT:1>]))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if _len_of_path < <NUM_LIT:2>:<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>y_axis_tag, _path_to_plot[-<NUM_LIT:1>]))<EOL><DEDENT><DEDENT>_live_path = _stack_sigma<EOL><DEDENT>_label = "<STR_LIT:/>".join(_path_to_plot)<EOL>while _path_to_plot:<EOL><INDENT>_item = _path_to_plot.pop(<NUM_LIT:0>)<EOL>_live_path = _live_path[_item]<EOL><DEDENT>_y_axis = _live_path[y_axis_tag]<EOL>ax_mpl.plot(_x_axis, _y_axis, fmt, ms=ms, lw=lw, alpha=alpha, label=_label)<EOL><DEDENT><DEDENT>if y_axis_tag[:<NUM_LIT:5>] != '<STR_LIT>' and y_axis_tag != '<STR_LIT>':<EOL><INDENT>ax_mpl.set_ylim(-<NUM_LIT>, <NUM_LIT>)<EOL><DEDENT>if logy is True:<EOL><INDENT>ax_mpl.set_yscale('<STR_LIT>')<EOL><DEDENT>if logx is True:<EOL><INDENT>ax_mpl.set_xscale('<STR_LIT>')<EOL><DEDENT>ax_mpl.set_xlabel(x_axis_label)<EOL>ax_mpl.set_ylabel(y_axis_label)<EOL>if not plotly:<EOL><INDENT>ax_mpl.legend(loc='<STR_LIT>')<EOL>return ax_mpl<EOL><DEDENT>else:<EOL><INDENT>fig_mpl = ax_mpl.get_figure()<EOL>plotly_fig = tls.mpl_to_plotly(fig_mpl)<EOL>plotly_fig.layout.showlegend = True<EOL>return plotly_fig<EOL><DEDENT>
display the transmission or attenuation of compound, element and/or isotopes specified

        Parameters:
        ===========
        :param x_axis: x type for export. Must be either ['energy'|'lambda'|'time'|'number']
        :type x_axis: str
        :param y_axis: y type for export. Must be either ['transmission'|'attenuation'|'sigma'|'sigma_raw'|'miu_per_cm']
        :type y_axis: str
        :param logx: True -> display x in log scale
        :type logx: boolean.
        :param logy: True -> display y in log scale
        :type logy: boolean.
        :param mixed: boolean. True -> display the total of each layer
                               False -> not displayed
        :param all_layers: boolean. True -> display all layers
                                    False -> not displayed
        :param all_elements: boolean. True -> display all elements signal
                                      False -> not displayed
        :param all_isotopes: boolean. True -> display all isotopes signal
                                      False -> not displayed
        :param items_to_plot: array that describes what to plot
            ex:
                [['CoAg','Ag','107-Ag'], ['CoAg']]
            if the dictionary is empty, everything is exported
        :param time_unit: string. Must be either ['s'|'us'|'ns']
               Note: this will be used only when x_axis='time'
        :param offset_us: default: 0
               Note: only used when x_axis='number' or 'time'
        :param source_to_detector_m: Note: this will be used only when x_axis='number' or 'time'
        :param time_resolution_us: Note: this will be used only when x_axis='number'
        :param t_start_us: when is the first acquisition occurred. default: 1
               Note: this will be used only when x_axis='number'
        :param plotly: control to use plotly to display or not.
        :type plotly: bool
        :param ax_mpl: matplotlib.axes to plot against
        :type ax_mpl: matplotlib.axes
        :param fmt: matplotlib.axes.plot kwargs
        :type fmt: str
        :param ms: matplotlib.axes.plot kwargs
        :type ms: float
        :param lw: matplotlib.axes.plot kwargs
        :type lw: float
        :param alpha: matplotlib.axes.plot kwargs
        :type alpha: float