“Where should I place the labels on my graph?” It’s question that comes up in many data visualization discussions. Although the decision about where to place your labels is largely an aesthetic preference, I do think there is an objective logic you can follow.

Let’s start with this simple line chart of the share of people in the labor force by generation—a graph that I saw in Axios and in Philip Bump’s newsletter. In this basic chart, we have a legend at the top of the graph.

There’s nothing inherently wrong with using a legend, but it’s disconnected from the data. As I argue in my Better Data Visualizations book, a better approach is to integrate your labels with the data, making the graph easier for your reader to understand. In this next graph, I remove the legend and directly label each line.

I see two issues with this revision.

First, the reader has to work to figure out which label goes with which line. I’ve arranged the labels to be as close to the associated line as possible, but there are some cases (e.g., Gen Z and Boomer) where the label is close to multiple series.

Adding color to each label is a simple change that can add clarity.

Second, depending on where the labels are placed, certain series may appear more important than others. For example, Because the “Gen X” label is closer to the title—which we believe people tend to read—it might be perceived as being more important and is more likely to be read.

Instead, let’s place the labels off the right side of the graph. This approach neatly orders them along a single vertical column, with the color-coordination integrating the text with the data. Keeping the labels aligned along a vertical line allows the reading process to be easier and faster.

In some cases, you might have missing data or an incomplete data series, as Philip Bump did in the original graph he published in his newsletter. Notice how the labels are aligned along the right-outer edge of the graph, but only the “Pre-silent” label sits by itself. Because the data are incomplete, that’s where that label has to go–but the rest of the labels are aligned and easy to read.

As you think about labelling strategies, try integrating the text with the data and making it as easy as possible for your reader to navigate through and around your graph.