Graphing = Dotted or Solid Line? When to Use Each in Your Graphs
Why Line Style Matters More Than You Think
Most people pick line styles randomly. Dotted because it looks "fancy," solid because it's the default. That's lazy graph-making, and it leads to confusion.
Line styles in graphs carry semantic meaning. When readers see a dotted line, they expect something different from a solid line. Ignoring this convention means your audience misreads your data—intentionally or not.
This guide cuts through the noise. You'll know exactly when to use each line style and why.
The Core Distinction
Here's the rule that most tutorials dance around:
Solid lines show continuous data or confirmed values. Dotted lines show projections, forecasts, or estimated data.
That's it. Everything else stems from this.
Solid lines represent what you know. Dotted lines represent what you expect or don't know for certain. Readers trained in data visualization expect this distinction. When you break it, you break trust.
When to Use Solid Lines
Solid lines are for:
- Historical data that has been collected and verified
- Actual measured values in an experiment
- Confirmed sales figures, population counts, or recorded temperatures
- Any data point where you have certainty about the value
When you plot last quarter's revenue, use a solid line. When you show this year's monthly rainfall totals, use a solid line. The solid line says "this happened."
Example in Practice
Imagine you're showing a company's stock price over five years. The line from year one to today—plotted with actual closing prices—gets a solid line. Everyone agrees on what those values are.
When to Use Dotted Lines
Dotted lines are for:
- Projected future values
- Trend lines or regression lines
- Estimated values based on models or forecasts
- Data that has been interpolated between known points
- Hypothetical scenarios
That stock price projection for next year? Dotted line. The trend line showing the general direction of your data? Dotted line. Anything uncertain or forward-looking gets the dotted treatment.
Why This Matters
Consider a graph showing climate data. The line from 1950 to 2023 is solid—these are recorded temperatures. The projection to 2050 is dotted—these are estimates based on models. A reader who sees both as solid lines might assume the 2050 values are already known. They're not.
The Gray Area: Interpolation and Uncertainty
Some data falls in between. What if you measured a value once per week but want to show the general pattern daily?
Interpolated points—values calculated between actual measurements—sit in a gray zone. Strict practitioners use dotted lines here because you're estimating. Practical practitioners often use solid lines because the underlying data is real, just smoothed.
My take: If you're interpolating, note it in the graph legend. Don't hide uncertainty behind a confident-looking solid line.
Color and Style Combinations
Style alone isn't enough. Combine it with color for clarity.
| Data Type | Line Style | Color Suggestion |
|---|---|---|
| Historical/Actual | Solid | Primary color (blue, black, dark green) |
| Projected/Forecast | Dotted | Same hue, lighter shade or gray |
| Target/Goal | Solid | Contrasting color (red for warning, green for target met) |
| Trend Line | Dotted or dashed | Neutral gray |
Matching colors between solid and dotted versions of the same data signals relationship. A solid blue line for actual values and a dotted blue line for projections tells readers "these are the same thing, different certainty levels."
When to Break the Rules
Sometimes conventions don't fit. Here's when breaking them works:
- Multiple overlaid trends: If you have five solid lines that overlap, switching one to dotted helps distinguish them
- Design constraints: Some publications require specific style guides that override general conventions
- Emphasis: A dotted line that draws attention to a forecast can be intentional rhetoric
Breaking convention is fine. Just document it. A clear legend prevents confusion.
Common Mistakes That Make Graphs Worse
Mistake 1: Mixing without explanation
Using both solid and dotted lines without a legend or label is just noise. Readers will guess, and they might guess wrong.
Mistake 2: Dotted for everything "creative"
Dotted lines don't look more sophisticated. Using them for actual data because you think it looks modern tells readers your data is uncertain when it isn't.
Mistake 3: Inconsistent styling
If one data series is solid, keep all comparable series solid. Switching styles mid-graph for no reason confuses patterns.
How to Implement This: A Quick Guide
Step 1: Identify your data types. Separate historical/actual from projected/estimated.
Step 2: Assign solid lines to confirmed data. Assign dotted lines to projections, forecasts, and interpolations.
Step 3: Match colors where possible. Same data, different certainty = same color, different style.
Step 4: Add a legend that explicitly states your convention. "Solid lines show actual values. Dotted lines show projections."
Step 5: Review. Ask someone unfamiliar with the data to interpret it without your guidance. If they get confused, fix the legend or styling.
Software-Specific Notes
Excel/Google Sheets: Select your data series → Format → Line Style → select Dash type (dotted is usually "Dot" or "Dash Dot").
Python (Matplotlib): Use linestyle='--' for dotted, linestyle='-' for solid.
R (ggplot2): Use lty=2 for dotted, lty=1 for solid.
Tableau: Use the "Line" mark type and adjust the "Line Style" in the formatting pane.
The Bottom Line
Solid lines = what happened. Dotted lines = what might happen. That's the convention, and it exists because it works.
Pick your line styles based on what your data actually represents. Not what looks better. Not what's easier. What your reader expects to see.
Your graph is a communication tool. Make it clear.