# Is it wrong to use line plots for discrete data?

I've often seen discrete datasets plotted as line plots, but it occurs to me that the line infers a value at a point between the measurement intervals which is meaningless for discrete datasets. Is it therefore the case the using line plots for discrete data is wrong?

As an example, take two time-series datasets, one continuous (my weight, measured daily in the morning) and one discrete (the number of donuts I eat per day). It makes sense for the first dataset to be a line plot, as it is reasonable to infer that my weight in any given afternoon will be related to my weight the preceding and following mornings. However, if the number of donuts is represented as a line graph the lines between the dots no meaning can be inferred from that line.

EDIT

Here's another example: the Federal Hourly Minimum Wage Since Its Inception plot at http://mste.illinois.edu/courses/ci330ms/youtsey/lineinfo.html

Unless I'm mistaken, the minimum wage changes are discrete, and hence it's not possible to look up some arbitrarily selected time and establish the minimum wage at the point using the line interconnecting the dots.

• (+1) The hourly minimum wage example is excellent. The very phrasing of your question suggests a good answer: namely, that connecting points on a graph is not valid when it would cause the reader to make inaccurate (or altogether invalid) interpolations. Making a distinction between discreteness and discontinuity would help with further analysis: the donut consumption is discrete while the minimum wage is discontinuous. Each deserves a different form of plot. – whuber Jun 21 '14 at 12:30
• There are plots where a scatter plot with discrete data is misleading over a line plot. For eample cases where a sequence of events is necessary (hysteresis), or oscillations between two levels occur and one needs to track down the state changes and their location. So: do not use line plots to imply interpolation, but use them as guidance if appropriate. It is not simple enough to makr a simple choice rule but needs consideration of data and model at hand. – wirrbel Jun 21 '14 at 23:37
• Interesting question! Thanks for that. I am dealing with a lot of time-related data which partly stems from discrete models and partly measured data. What about the option of using stepped line plots for discrete data (which can be continuous in a way but we still have no function between the single points and cannot just assume to have one) and regular ones for continuous data? That is the way I deal with it.. – Cord Kaldemeyer Jun 20 '19 at 10:19
• @CordKaldemeyer thanks for commenting - I wasn't aware of the chart type "stepped line plot", but that's definitely what I'm looking for. I also found this helpful tutorial on doing stepped line plots in Excel: trumpexcel.com/step-chart-in-excel – user1379351 Jun 21 '19 at 12:07
• @user1379351: Glad I could help! – Cord Kaldemeyer Jun 21 '19 at 14:28

Connected line plots have proven too useful to limit to a single interpretation. A few prominent uses:

• Interpolated values. The case you mention where both variables are continuous and every interpolated point along the line as a meaningful interpretation.
• Rate of change. Even when the in-between values aren't meaningful, the slope of each line segment is a good representation of the rate of change. Note that for this interpretation, the X and Y values must be spaced appropriately, which is not the case in the wage plot you cite.
• Profile Comparison. When comparing small multiples or overlaid measures, lines can be useful even for categorical factors. In this case, the lines serve to connect groups of responses for limited pattern recognition. Here's an example from peltiertech.com with the factor on the Y (instead of the X) axis for label readability: • True, but the 2nd and 3rd graphs are strictly less powerful than the first, since one can't use calculus at all. – Milind R Aug 17 '16 at 12:23

Well, the donuts might be related to the weight :-)

While I see your point, I think this example is not so bad because time (on the horizontal axis, which is what the lines refer to) is continuous. The meaning of the line, to me, isn't so much that, at each time of day you ate a certain number of donuts, but that the number of donuts per day changes in some regular way. Thus, we might add something like a loess smoother to the line, and it would make sense. It is at least reasonable to think of donuts eaten at each hour, or even each minute (although this would be more sensible with a variable where the count per day was higher)

What is more worrisome is when the horizontal axis is discrete (and especially when it is nominal) but lines are drawn. This really makes no sense. E.g. if you are looking at (say) the % voting for Obama among (say) residents of different regions of the USA, it makes no sense to draw a line between Northeast and Midwest; especially since the order of the regions is arbitrary, but changing the order would change the lines. Yet I have seen graphs like this.

• Absolutely agree that there are much worse abuses of line graphs out there. I like the smoother approach as it doesn't connect the dots, and hence doesn't imply data that's not there. But it does serve to highlight the worrying trend in donut consumption. Thanks! – user1379351 Jun 21 '14 at 9:09
• You seem to be proposing replacing one variable--donut consumption--with another one; namely, a donut consumption density (donuts per unit time). Although this is frequently done--especially in two-dimensional analyses (such as maps of population density)--and can be very effective, it would be well for readers to be aware that there is a distinction and to consider how that distinction could be revealed graphically. – whuber Jun 21 '14 at 12:35
• @whuber That's a fair point; the line does seem to make that replacement. A graph that does not make that replacement could just be dots, unconnected, but that seems to make at least a hint at donut consumption being located at a particular point. So, we might render time as continuous and put a dot at the moment when a donut was consumed. – Peter Flom Jun 21 '14 at 22:58