Decluttering

Learn how to declutter a chart in Altair by properly formatting axes and removing grids.

We'll cover the following

Decluttering is the process of simplifying a chart by removing unnecessary or distracting elements. The goal of decluttering is to make the chart easier to understand and focus the audience’s attention on the most important information.

We can declutter the following elements in a chart:

  • Axes: We can declutter them if there are too many tick marks or the labels are too dense. In some cases, we can remove the axes entirely if they are not necessary for understanding the data.

  • Grid lines: We can remove them if they are too dense or they distract from the data.

Axes

In Altair, we can declutter an axis in two ways:

  • Remove the axis completely. We can use axis=None as an additional parameter of the axis channel. The competition dataset can be used to build the following example:

Get hands-on with 1200+ tech skills courses.