# 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
                            color='#7f7f7f',
                        ),
                        showgrid=grid,
                        showline=yaxis,
                        showticklabels=yticks,
                    )

        if xlabel:
            for k in ldata:
                if 'xaxis' in k:
                    ldata['xaxis'] = dict(
                        title=xlabel,
                        titlefont=dict(
                            family='Courier New, monospace',
                            size=18,
                            color='#7f7f7f',
                        ),
                        showgrid=grid,
                        showline=xaxis,
                        showticklabels=xticks,
                    )

        ldata['showlegend'] = legend
        x_size = self.size[0] if self.size[0] > 100 else self.size[0] * 100
        y_size = self.size[1] if self.size[1] > 100 else self.size[1] * 100
        ldata['width'], ldata['height'] = x_size, y_size
        return FigureWidget(data=tdata, layout=ldata)

    def area(self, data, color=None, y_axis='left', stacked=False, subplot=False, **kwargs):
        for i, col in enumerate(data):

# 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

                            color='#7f7f7f',
                        ),
                        showgrid=grid,
                        showline=yaxis,
                        showticklabels=yticks,
                    )

        if xlabel:
            for k in ldata:
                if 'xaxis' in k:
                    ldata['xaxis'] = dict(
                        title=xlabel,
                        titlefont=dict(
                            family='Courier New, monospace',
                            size=18,
                            color='#7f7f7f',
                        ),
                        showgrid=grid,
                        showline=xaxis,
                        showticklabels=xticks,
                    )

        ldata['showlegend'] = legend
        x_size = self.size[0] if self.size[0] > 100 else self.size[0] * 100
        y_size = self.size[1] if self.size[1] > 100 else self.size[1] * 100
        ldata['width'], ldata['height'] = x_size, y_size
        return FigureWidget(data=tdata, layout=ldata)

    def area(self, data, color=None, y_axis='left', stacked=False, subplot=False, **kwargs):
        for i, col in enumerate(data):

            c = get_color(i, col, color)