

def legend(self, title=None, scale='color', text_color=None):
    "Convience method for adding a legend to the figure.\n\n        Important: This defaults to the color scale that is generated with\n        Line, Area, Stacked Line, etc charts. For bar charts, the scale ref is\n        usually 'y'.\n\n        Parameters\n        ----------\n        title: string, default None\n            Legend Title\n        scale: string, default 'color'\n            Scale reference for legend\n        text_color: str, default None\n            Title and label color\n        "
    self.legends.append(Legend(title=title, fill=scale, offset=0, properties=LegendProperties()))
    if text_color:
        color_props = PropertySet(fill=ValueRef(value=text_color))
        text_color.legends[0].properties.labels = color_props
        self.legends[0].properties.title = color_props
    return self

dataset/ETHPy150Open wrobstory/vincent/vincent/visualization.py Visualization.legend/VarMisuse@71/258 `self`->`text_color`