parameters: (self, ax, cmap, **legend_kwargs)
docstring: Add a legend to the plot.
docstring_summary: Add a legend to the plot.
docstring_tokens: Add a legend to the plot .
function: def add_legend(self, ax, cmap, **legend_kwargs):
          """Add a legend to the plot."""
  
          leg = create_legend(ax, cmap, self.class_id, self.unique_classes)
          ax.legend(handles=leg, **legend_kwargs)
function_tokens: def add_legend ( self , ax , cmap , * * legend_kwargs ) : leg = create_legend ( ax , cmap , self . class_id , self . unique_classes ) ax . legend ( handles = leg , * * legend_kwargs )