How to | Make a Legend for My Charts

The Wolfram Language provides an extensive, straightforward set of tools to control the appearance of your charts. Whether you are creating chart legends with the symbolic wrapper Legended or with the ChartLegends option, the legends you create inherit the styling chosen for your chart.

You can use ChartLegends to create legends for your charts.

The labels match the data elements:

To omit a data element from the legend, use None in place of its label:

Groups of data can also appear in legends:

Use ChartLabels to create repeating labels for the data elements in each group:

Use LegendAppearance to change the layout of the labels within the legend, which in this case effectively changes the position of the legend:

Alternatively, use Placed to put the legend across the bottom of the chart:

ChartLegends also works with 3D charts:

    

Any styling that you apply to your charts is reflected in the legend.

Here, images of textures from ExampleData are set up for use as pictorial bars:

Color the textures:

Create a bar chart with the textured bars. The textures also appear in the legend:

    

You can also use the symbolic wrapper Legended to create legends for your charts.

By using Legended, you can provide legend entries for specific data elements in your charts:

Legended also works with 3D charting functions: