Grid lines and tick marks #
last modified February 24, 2026
~7 minute read
Why we use tick marks and grid lines #
As discussed in the module concerning axes, the fundamental purpose of axes is to establish a quantitative scale against which data is plotted. This purpose is primarily functional, interpreted by rendering software; explicit display of this scale is not always a strict visual requirement. For instance, pie charts inherently rely on an angular scale without ever drafting the axes visually.
However, in the vast majority of data visualizations, this scale is explicitly projected onto the canvas as axes. When doing so, it is necessary to provide corresponding orientation markers to help the viewer interpret this scale. At a bare minimum, numerical values are required, but it is standard practice to ‘anchor’ these numerals directly to the axis line using either tick marks or grid lines. Without these visual ‘anchors,’ the numerals appear to uncomfortably “float” along the axis, creating cognitive friction.
This is particularly important for the quantitative axes of bar charts, which need to start at a proper reference value (usually 0) to be properly constructed:
Tick marks: the more subtle approach #
Choose reasonable lengths for the tick mark line #
When utilizing tick marks, you must intentionally define their geometry. Subtle, unobtrusive tick marks are generally preferable. A reliable heuristic for determining length is to consider the accompanying typography. If your font is sized for comfortable readability, a tick mark scaled to 50% of the font height is usually ideal. For example, if you are typesetting at a 10-point size, configure major tick marks to approximately 5 points in length.
When thinking about major tick marks, I usually try to use something that is 33% or 50% as long, usually favoring the former. So, for a 5 point size tick major tick mark, my minor tick marks are often 2 points in size.
There is also the question of line width. It is not uncommon to see cases where the major tick marks are noticeably thicker than the minor ones:
However, I often do not use different widths for my major and minor tick marks, since I think that adds visual clutter—it introduces a new parameter that is not needed. Instead, the difference in lengths—and the fact that the major tick marks are labeled, while the minor ones are not—is sufficient to distinguish the two types of tick marks. Thus, I will often just use the same thickness as the axis line, providing a visual indication that the major and minor tick marks are really part of the axis system.
Gridlines: The more robust signal #
Use gridlines when you want a much stronger tick mark or want to divide up your plot visually #
Are you concerned that your audience might overlook subtle tick marks? If so, gridlines present a robust alternative. Gridlines effectively map the coordinate location of a tick mark continuously across the entire plotting canvas. Consequently, gridlines spatially intersect the data—the exact locus of visual attention—ensuring the coordinate layout is unambiguously recognized.
The fact that gridlines overlap with data, however, suggest that they are competing for attention with your data. Thus, I think the default should always be use to tick marks (keeping the plotting area clutter free) and then ask your self if you really need grid lines.
Of course you can reduce this weight by changing the color to be more grey, instead of black.
But even here, I think that the gridlines are a bit distracting, and so I would just stick with tick marks, unless there is a good reason for gridlines.
One such reason may be for non-linear axes. People can overlook the scale indicators, when they are tick marks, and using gridlines puts this right in their face.
Just accept that, by doing so, you have added some clutter to your plot.
Another place that gridlines can make sense is when you wish to divide up a plot in to regions that make sense. For instance, perhaps you have quadrants in a plot, split up at a particular value. Using gridlines for these can really produce a strong visual representation of them—communicating meaning.
And this is a golden rule for the design of data visualizations: if introducing a visual element helps you communicate your story better, then it was probably a good design idea.
Choose reasonable thicknesses, patterns, and colors for your grid lines #
Unlike tick marks, you cannot really have different lengths of grid lines. The grid lines extend across the entire plotting canvas. Thus, the variables that remain are the same as we have for any line: thickness, patterns, and color. You will see all of these used to distinguish between gridlines. I do not wish to go into depth here, since this is covered well in the page on lines. But we can illustrate a few ideas.
Thickness #
In using thickness, I often set the major grid line at a thickness equal to that of the axes, and then the minor grid lines at 33% of this value.
This can create a case where the minor grid lines are hard to see, and so you can also consider setting the minor grid lines at the same thickness of the axes, and then having the major grid lines $2\times$ this value.
Pattern #
You will also fin that people use patterns. That is, you can set the major and minor grid lines the same thickness (perhaps the same as the axis line) and then make the minor grid lines have a pattern, perhaps drawing them as a dotted line. This will use less ink for the minor gridlines, and so make them readily identifiable as such.
Color #
You might notice that in both the use of thickness and patterns, the minor gridlines had the illusion of being lighter in color. This is an optical illusion, but does give us an indication of yet another way we might differentiate the two. We can use the same thickness and pattern and then set the minor grid lines to be a lighter color than the major grid lines, which can be a way to retain uniform width and pattern, but still have things distinguishable.
Of course, you can combine all of these ideas, though I do think that, in general only one needs to be implemented at a time. Changing too many variables can lead to a bit of visual clutter, in my opinion.
You (mostly) do not need both grid lines and tick marks #
Grid lines and tick marks ultimately fulfill the identical functional goal: dissecting the axis scale. Therefore, employing both elements simultaneously is almost always redundant. A common design misstep is deploying grid lines accompanied by tick marks of an entirely conflicting design standard—for instance, styling grid lines in a subdued grey while abruptly rendering tick marks in heavy black:
We do not need both elements. So, choose just one. Either use one or the other (as illustrated in all the plots above) or set the tick marks to be identical in design to the grid lines, so it just seems like the grid lines pass through the axis lines.
Key takeaways #
All things being equal, tick marks are predominantly favored over grid lines for their high data-to-ink ratio. Evaluating the concluding plot example above against its tick-mark-only counterpart solidifies this preference; the absence of crisscrossing lines generates a significantly cleaner aesthetic.
However, as outlined previously, specific functional requirements can justify gridlines. Additionally, stylistic choices may play a role. Visually, grid lines impart a decidedly strict, “engineering” or “technical” motif. If your subject matter aligns with those aesthetics, gridlines can subtly support the thematic narrative. Lacking such explicit justifications, default to the elegance of tick marks.
page last modified February 24, 2026