# Path: lantern/plotting/plotobj.py
# class BasePlot(with_metaclass(ABCMeta)):
#     def __init__(self, backend):
#         pass
# 
#     @abstractmethod
#     def show(self, title='', xlabel='', ylabel='', xaxis=True, yaxis=True, xticks=True, yticks=True, legend=True, grid=True, **kwargs):
#         pass
# 
#     @abstractmethod
#     def area(self, data, color=None, y_axis='left', stacked=False, **kwargs):
#         pass
# 
#     @abstractmethod
#     def bar(self, data, color=None, y_axis='left', stacked=False, **kwargs):
#         pass
# 
#     @abstractmethod
#     def hist(self, data, color=None, y_axis='left', stacked=False, **kwargs):
#         pass
# 
#     @abstractmethod
#     def hline(self, y, color=None, **kwargs):
#         pass
# 
#     @abstractmethod
#     def hspan(self, yhigh, ylow, color=None, **kwargs):
#         pass
# 
#     @abstractmethod
#     def line(self, data, color=None, y_axis='left', **kwargs):
#         pass
# 
#     @abstractmethod
#     def scatter(self, data, color=None, x=None, y=None, y_axis='left', **kwargs):
#         pass
# 
#     @abstractmethod
#     def step(self, data, color=None, y_axis='left', **kwargs):
#         pass
# 
#     @abstractmethod
#     def vline(self, x, color=None, **kwargs):
#         pass
# 
#     @abstractmethod
#     def vspan(self, xhigh, xlow, color=None, **kwargs):
#         pass
# 
# Path: lantern/plotting/plotutils.py
# def get_color(i, col, color):
#     if isinstance(color, list):
#         c = (color[i:i + 1] or [_r()])[0]
#     elif isinstance(color, dict):
#         c = color.get(col, _r())
#     elif isinstance(color, str) and color:
#         c = color
#     else:
#         c = _r()
#     return c


import plotly.graph_objs as go
from colorlover import to_rgb
from plotly.graph_objs import FigureWidget
from .plotobj import BasePlot
from .plotutils import get_color
                                    'line': {'color': line[1], 'width': 1, 'dash': 'solid'},
                                    'xref': 'x',
                                    'yref': 'paper',
                                    'type': 'line'})

        for line in self.hspans:
            col = to_rgb(line[2])
            r = str(round(col[0] * 255))
            g = str(round(col[1] * 255))
            b = str(round(col[2] * 255))

            ldata['shapes'].append({'x0': 0,
                                    'x1': 1,
                                    'y0': line[1],
                                    'y1': line[0],
                                    'line': {'color': line[2], 'width': 1, 'dash': 'solid'},
                                    'xref': 'paper',
                                    'yref': 'y',
                                    'type': 'rect',
                                    'fillcolor': 'rgba(' + r + ',' + g + ',' + b + ',.5)'})

        for line in self.vspans:
            col = to_rgb(line[2])
            r = str(round(col[0] * 255))
            g = str(round(col[1] * 255))
            b = str(round(col[2] * 255))

            ldata['shapes'].append({'y0': 0,
                                    'y1': 1,
                                    'x0': line[1],

# Path: lantern/plotting/plotobj.py
# class BasePlot(with_metaclass(ABCMeta)):
#     def __init__(self, backend):
#         pass
# 
#     @abstractmethod
#     def show(self, title='', xlabel='', ylabel='', xaxis=True, yaxis=True, xticks=True, yticks=True, legend=True, grid=True, **kwargs):
#         pass
# 
#     @abstractmethod
#     def area(self, data, color=None, y_axis='left', stacked=False, **kwargs):
#         pass
# 
#     @abstractmethod
#     def bar(self, data, color=None, y_axis='left', stacked=False, **kwargs):
#         pass
# 
#     @abstractmethod
#     def hist(self, data, color=None, y_axis='left', stacked=False, **kwargs):
#         pass
# 
#     @abstractmethod
#     def hline(self, y, color=None, **kwargs):
#         pass
# 
#     @abstractmethod
#     def hspan(self, yhigh, ylow, color=None, **kwargs):
#         pass
# 
#     @abstractmethod
#     def line(self, data, color=None, y_axis='left', **kwargs):
#         pass
# 
#     @abstractmethod
#     def scatter(self, data, color=None, x=None, y=None, y_axis='left', **kwargs):
#         pass
# 
#     @abstractmethod
#     def step(self, data, color=None, y_axis='left', **kwargs):
#         pass
# 
#     @abstractmethod
#     def vline(self, x, color=None, **kwargs):
#         pass
# 
#     @abstractmethod
#     def vspan(self, xhigh, xlow, color=None, **kwargs):
#         pass
# 
# Path: lantern/plotting/plotutils.py
# def get_color(i, col, color):
#     if isinstance(color, list):
#         c = (color[i:i + 1] or [_r()])[0]
#     elif isinstance(color, dict):
#         c = color.get(col, _r())
#     elif isinstance(color, str) and color:
#         c = color
#     else:
#         c = _r()
#     return c


# Path: lantern/plotting/plot_plotly.py
import plotly.graph_objs as go
from colorlover import to_rgb
from plotly.graph_objs import FigureWidget
from .plotobj import BasePlot
from .plotutils import get_color

                                    'line': {'color': line[1], 'width': 1, 'dash': 'solid'},
                                    'xref': 'x',
                                    'yref': 'paper',
                                    'type': 'line'})

        for line in self.hspans:
            col = to_rgb(line[2])
            r = str(round(col[0] * 255))
            g = str(round(col[1] * 255))
            b = str(round(col[2] * 255))

            ldata['shapes'].append({'x0': 0,
                                    'x1': 1,
                                    'y0': line[1],
                                    'y1': line[0],
                                    'line': {'color': line[2], 'width': 1, 'dash': 'solid'},
                                    'xref': 'paper',
                                    'yref': 'y',
                                    'type': 'rect',
                                    'fillcolor': 'rgba(' + r + ',' + g + ',' + b + ',.5)'})

        for line in self.vspans:
            col = to_rgb(line[2])
            r = str(round(col[0] * 255))
            g = str(round(col[1] * 255))
            b = str(round(col[2] * 255))

            ldata['shapes'].append({'y0': 0,
                                    'y1': 1,
                                    'x0': line[1],

                                    'x1': line[0],