Ejemplo n.º 1
0
def make_spectrum_plotitem( spec: Spectrum, color: str = None ) -> Gnuplot.Data:
    """
    Takes in a Spectrum class and returns Gnuplot.Data format for plotting using the data within the Spectrum object
     
    :param spec:
    :type spec: Spectrum
    :param color: 
    :type color: str
    :return: 
    :rtype: Gnuplot.Data
    """
    if color is not None:
        _with = f' lc "{color}"'
    return make_line_plotitem( spec.getWavelengths(), spec.getFluxlist(), title=spec.getNS(), with_=_with )