def add_series(self, series, label=None, **kwargs):
        """
        A series is a list of pairs (2-tuples)

        Optional Args:
            bars
            line
            points - for each of these present as keyword arguments,
                     their value should be a dict representing the 
                     line type options relative to their type. 
                     Alternatively, if the value is `True` the option 
                     for showing the line type {'show': True} will
                     be set for the options for this line type.
        """
        if not series:
            raise MissingDataException

        #detect time series
        testatom = series[0][0]
        if isinstance(testatom, date):
            series = [(int(time.mktime(ts.timetuple()) * 1000), val) \
                        for ts, val in series]
            self._options['xaxis'] = {'mode': 'time'}

        new_series = {'data': series}
        if label and label in [x.get('label', None) for x in self._series]:
            raise DuplicateLabelException
        elif label:
            new_series.update(label=label)
        for line_type in LINE_TYPES:
            if line_type in kwargs:
                if isinstance(kwargs[line_type], collections.Mapping):
                    new_series.update({line_type: kwargs[line_type]})
                else:
                    new_series.update({line_type: {'show': True}})
        self._series.append(new_series)

    #def add_time_series(self, series, label=None, **kwargs):
        #"""
        #A specialized form of ``add_series`` for adding time-series data.

        #Flot requires times to be specified in Javascript timestamp format.
        #This convenience function lets you pass datetime instances and handles
        #the conversion. It also sets the correct option to indicate to ``flot``
        #that the graph should be treated as a time series
        #"""
        #_series = [(int(time.mktime(ts.timetuple()) * 1000), val) \
                    #for ts, val in series]
        #self._options['xaxis'] = {'mode': 'time'}
        #return self.add_series(_series, label, **kwargs)
dataset/ETHPy150Open unbracketed/python-flot-utils/pyflot/graph.py/Flot.add_series/original