Описание тега legend

A graph legend is commonly used when plotting several sets of data within the same diagram. The legend associates each plot with its corresponding data.

A legend attached to a graph (or other visualization of data) is used to explain the graphical language (colors, symbols, lines, etc) of the specific visualization.

In scientific software r for statistical computing and graphics and also matplotlib, function legend adds a legend box to an existing plot.