Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I have an argument with my advisor over data visualization. He claims that when representing experimental results, the values should be plotted with "markers" only, as presented in the image bellow. While curves should only represent a "model"

Markers.png

I on the other hand believe that a curve is unnecessary in many cases in order to facilitated readability, as shown in the second image bellow:

Lines.png

Am I wrong or my professor? If the later one is the case, how do I go around to explain this to him.

share|improve this question

migrated from academia.stackexchange.com Feb 6 '13 at 12:43

This question came from our site for academics and those enrolled in higher education.

5  
The points are the data. The curves that you fit to the points are not the data. So if your intent is to show the data.... –  JeffE Feb 6 '13 at 3:26
3  
As JeffE says. To be even more explicit: the curves you plotted are a model, because you assumed a particular shape when drawing them, and you had some reasoning for this shape. This reasoning is based on a particular model. –  gerrit Feb 6 '13 at 8:54
1  
I've submitted a migration request; this really does belong in crossvalidated, not here. –  aeismail Feb 6 '13 at 12:14
2  
I think it might be on-topic on CrossValidated, but it is definitely also on topic here. Migration should only be considered if it's off-topic here, (there are questions that would be on-topic on two sites, that's okay). It's a real question with valid answers, it is definitely relevant for many academics. –  F'x Feb 6 '13 at 12:33
2  
Your second chart is dubious. If you'd joined the points up with straight lines you (maybe) have an argument for visual clarity. But using a curve you are claiming that the blue line peak is at 740°, and the purple line minimum is at 840°, even though you have no experimental data at those temperatures. Introducing min/max outside the measured data is a red flag. –  Darren Cook Feb 7 '13 at 23:48

5 Answers 5

up vote 9 down vote accepted

I like this rule of thumb:

If you need the line to guide the eye (i.e. to show a trend that without the line would not be visible as clearly), you should not put the line.

Humans are extremely good at recognizing patterns (we're rather on the side of seeing trends that do not exist than missing an existing trend). If we are not able to get the trend without line, we can be pretty sure that no trend can be conclusively shown in the data set.

Talking about the second graph, the only indication of the uncertainty of your measurement points are the two red squares of C:O 1.2 at 700 °C. The spread of these two means that I would not accept e.g.

  • that there is a trend at all for C:O 1.2
  • that there is a difference between 2.0 and 3.6
  • and for sure the curved models are overfitting the data.

without very good reasons given. That, however, would again be a model.


edit: answer to Ivan's comment:

I'm chemist and I'd say that there is no measurement without error - what is acceptable will depend on the experiment and instrument.

This answer is not against showing experimental error but all for showing and taking it into account.

The idea behind my reasoning is that the graph shows exactly one repeated measurement, so when the discussion is how complex a model should be fit (i.e. horizontal line, straight line, quadratic, ...) this can give us an idea of the measurement error. In your case, this means that you would not be able to fit a meaningful quadratic (spline), even if you had a hard model (e.g. thermodynamic or kinetic equation) suggesting that it should be quadratic - you just don't have enough data.

To illustrate this:

df <-data.frame (T      =         c ( 700,  700,  800, 900,  700, 800, 900, 700, 800, 900), 
                 C.to.O = factor (c ( 1.2,  1.2,  1.2, 1.2,  2  , 2  , 2  , 3.6, 3.6, 3.6)),
                 tar    =         c (21.5, 18.5, 19.5, 19,  15.5, 15 , 6  , 16.5, 9, 9))

Here's a linear fit together with its 95% confidence interval for each of the C:O ratios:

ggplot (df, aes (x = T, y = tar, col = C.to.O)) + geom_point () + 
    stat_smooth (method = "lm") + 
    facet_wrap (~C.to.O)

linear model

Note that for the higher C:O ratios the confidence interval ranges far below 0. This means that the implicit assumptions of the linear model are wrong. However, you can conclude that the linear models for the higher C:O contents are already overfit.

So, stepping back and fitting a constant value only (i.e. no T dependence):

ggplot (df, aes (x = T, y = tar, col = C.to.O)) + geom_point () + 
    stat_smooth (method = "lm", formula = y ~ 1) + 
    facet_wrap (~C.to.O) 

no T dependence

The complement is to model no dependence on C:O:

ggplot (df, aes (x = T, y = tar)) + geom_point (aes (col = C.to.O)) + 
    stat_smooth (method = "lm", formula = y ~ x) 

no C:O dependence

Still, the confidence interval would cover a horizontal or even slightly ascending lines.

You could go on and try e.g. allowing different offsets for the three C:O ratios, but using equal slopes.

However, already few more measurements would drastically improve the situation - note how much narrower the confidence intervals for C:O = 1 : 1 are, where you have 4 measurements instead of only 3.

Conclusion: if you compare my points of which conclusions I'd be sceptical of, they were reading way too much into the few available points!

share|improve this answer
    
you make very good point. However in engineering, experimental error (uncertainty) is very common and it is assumed that 3~5% relative error is acceptable. Still I am required to show MAX, MIN and AVG results. So in my case the markers are the extremities and the line is the average. –  Ivan P. Feb 7 '13 at 2:39
    
very good and extremely helpful example (you got me interested in R). So, of course the right thing to do is get more data points. –  Ivan P. Feb 8 '13 at 0:27

As JeffE says: the points are the data. In general, it's good to avoid adding curves as much as possible. One reason for adding curve is that it makes the graph nicer to the eye, by making the points and the trend between the points more readable. This is particularly true if you have few data points.

However, there are other ways to display sparse data, that may be better than a scatter plot. One possibility is a bar chart, where the various bars are much more visible than your single points. A color code (similar to what you already have in your figure) will help see the trends in each data series (or the data series could be split, and presented next to each other in smaller individual bar charts).

Finally, if you really want to add some sort of line between your symbols, there are two cases:

  1. If you expect a certain model to be valid for your data (linear, harmonic, whatever), you should fit your data on the model, explain the model in the text and comment on the agreement between data and model.

  2. If you do not have any reasonable model for the data, you should not include extra assumptions in your graph. In particular, this means you should not include any type of lines between your points except strait lines. The nice “spline fit” interpolations that Excel (and other software) can draw are a lie. There is no valid reason for your data to follow that particular mathematical model, so you should stick to straight line segments.

    Furthermore, in that case it can be nice to add a disclaimer somewhere in the figure caption, like “lines are only guides for the eye”.

share|improve this answer
2  
This is excellent advice minus the comment about bars being more appropriate. For similar discussion related to that see Alternative graphics to “handle bar” plots. Imagine the plot listed by the OP as a clustered bar chart, it would be mightily difficult to visualize the trend across tempature ranges. A way to make the points more easily visible is to jitter them along the x-axis, and Cleveland's work would suggest we should prefer points to bars anyway. –  Andy W Feb 6 '13 at 12:57
    
@Andy W, what do you mean by "jitter them along the x-axis"? –  Ivan P. Feb 6 '13 at 13:50
1  
@IvanP., I mean instead of making the points fixated to that particular value on the abscissa to move them to the right or left slightly so the points don't cover each other up. It should be clear from the rest of the graph that they really refer to exact values for the groups on the x-axis, and the slight jitter should have no effect on visualizing the trend between values. –  Andy W Feb 6 '13 at 13:59

1-Your professor is making a valid point.

2-Your plot definitely does not increase readability IMHO.

3-From my understanding this is not the right forum to ask this sort of a question really and you should ask it at cross-validated.

share|improve this answer
    
I am interested to know where the problem in readability is and any suggestions for improvement are very much welcome –  Ivan P. Feb 6 '13 at 13:52

Sometimes joining points makes sense, especially if they are very dense.

And then it may make sense to interpolate (e.g. with a spline). However, if it is anything more advanced than spline of order one (for which it is visibly obvious that it is just joining points), you need to mention it.

However, for the case of a few points, or a dozen, points, it is not the case. Just leave the points as they are, with markers. If you want to fit a line (or another curve), it is a model. You can do add it, but be explicit - e.g. "line represents linear regression fit".

share|improve this answer

I think there are cases where one is not proposing an explicit model, yet needs some kind of guide to the eye. My rule then is to avoid curves like the plague and stick to piecewise straight lines between successive points of a series.

For one, this assumption is more obvious to readers. Also the spikiness is good at keeping readers away from assuming trends unsupported by data. If at all, this only highlights noise and outliers.

The stuff I'm wary of is cursory (non-rigorous, non-explicit) use of splines, quadratics, regression etc. Very often this makes it seem there are trends where there are none. A good example of abuse are the curves drawn by @Ivan. With 3 datapoints I don't think any maxima or minima in the underlying model are obvious.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.