Questions on legends, figures (usually insets) that indicate what those lines/bars/points in plots refer to, using arrangements of graphic elements and text, whether manually or using built-in functions.
Mathematica provides built-in
Legend functionality for charting functions such as
PieChart. For plotting functions such as
PlotLegends` package is available. However it is slow and difficult to customise. The
ShowLegend function provided by that package offers a little more control. Generally, however, both performance and aesthetics are better if one uses a custom function such as this one.
Please consider using one of the tags graphics or graphics3d according to whether your question is about 2D or 3D graphics.
- How to Make a Legend for my Plots
- How to Make a Legend for My Charts
- "Plot Legends" Package
- Chart Labeling, Legending & Annotation Overview