def line(x0, y0, x1, y1, color=None, width=None):
    """Return a line shape

    args:
        x0, y0, x1, y1: beginning and end of line
        color (str): a plotly color string
        width (int): line width
    """
    data = {'type': 'line', 'x0': x0, 'y0': y0, 'x1': x1, 'y1': y1, 'line': {}}
    if color:
        data['line']['color'] = color
    if width:
        data['line']['width'] = width
    return data
