2
$\begingroup$

Suppose you have some measurement series with quite different variances, see e.g., figure below.

enter image description here

The problem is that the differences between a, b, and d are barely recognizable, because the y-scale is rather large, because of the first measurement (these are no measurement errors, they are quite essential and can not be ignored). What is the most elegant way to plot the data without losing too much information.

Two possibilities come to my mind:

a) Leave the first measurement out, and supply it otherwise (e.g., in the text or as a table).

b) Make the y-scale exponential (inverse of log). However, this is quite uncommon (how do you do this with R?).

What would you suggest?

$\endgroup$
  • $\begingroup$ Plot the geometric mean in one panel, and the ratios to the geometric mean in a second panel underneath? Might still need to have a scale break for the first point. $\endgroup$ – Glen_b Nov 29 '13 at 8:26
  • $\begingroup$ Or if one of the variables can be regarded as a baseline, use it instead, by plotting ratios in respect of it. $\endgroup$ – Glen_b Nov 29 '13 at 9:39
  • $\begingroup$ Exponential scale looks very possible. If y is bounded by 0 and 1 but neither is attainable then logit scale is also possible. More generally, why be put off by a scale being unusual? The more it helps, the more you get credit for a unusual and good idea. But it is best to ensure that readers, including you, see text labels such as 0.1(0.1)0.9 on the axis. I don't know how to do that in R, which I don't use routinely, but it should be trivial. $\endgroup$ – Nick Cox Nov 29 '13 at 10:35
  • $\begingroup$ Thank you for your suggestions. Do you think it is necessary to mention that the plot uses a exponential scale, or does the text labels on the axis speak for themselves? $\endgroup$ – Funkwecker Nov 29 '13 at 12:40
3
$\begingroup$

I agree with exponential scale and plotting ratios if there is a reference method. Here are some extra, different thoughts:

  • Not knowing the context, I think the chart scale is fine as is. I can tell what reading of each point approximately and I can also see the trends quite clearly. Transformation fixes some problems and creates some other (mostly on interpretation,) and I'd not use it if, as you said, the norm in your field has been using original scale. In addition, if the first reading is non-trivial, then what's the point of downplaying the fact that it is much lower?
  • If the lines are close together, then the lines are close together. From design point of view, I understand why lines a and b should be distinguishable on the chart; but I would be careful not to mix visual distinction with contextual distinction. If they are indeed very close measurements, then yes, it's logical that they are indistinguishable.

To deal with overlapping lines, an approach I often use is to just let them overlap, but use paneling to highlight each of the lines. Here is a black and white example:

enter image description here

This layout allows any line to completely overlap with another line. They will each have a chance to shine.

Here is a colored version. I use a lower saturation value to downplay the background lines, and use a higher saturation and thickness to emphasize the main line:

enter image description here

Here is the reference code:

set.seed(112)

y1 <- rnorm(40)
y2 <- rnorm(40)
y3 <- rnorm(40)
y4 <- rnorm(40)
x  <- seq(1,40)

ymin <- min(c(y1, y2, y3, y4))
ymax <- max(c(y1, y2, y3, y4))

##### Black and white version #####

smallPlot <- function(v1, v2, v3, v4, v5) {
par  (mar=c(5,5,1,1))
plot (x, v2, type="l", col="#cccccc",
      ylim=c(ymin, ymax), ylab=v5, axes=F)
lines(x, v3, col="#cccccc")
lines(x, v4, col="#cccccc")
lines(x, v1)
axis (side=1)
axis (side=2)
}

par(mfrow=c(2,2))
smallPlot(y1, y2, y3, y4, "y1")
smallPlot(y2, y3, y4, y1, "y2")
smallPlot(y3, y4, y1, y2, "y3")
smallPlot(y4, y1, y2, y3, "y4")

##### Colored version #####

smallPlot <- function(v1, v2, v3, v4, v5, c1, c2, c3, c4) {
par  (mar=c(5,5,1,1))
plot (x, v2, type="l", col=c2,
      ylim=c(ymin, ymax), ylab=v5, axes=F)
lines(x, v3, col=c3)
lines(x, v4, col=c4)
lines(x, v1, col=c1, lwd=2)
axis (side=1)
axis (side=2)
}

par(mfrow=c(2,2))
smallPlot(y1, y2, y3, y4, "y1", "#1F78B4", "#B2DF8A", "#FB9A99", "#FDBF6F")
smallPlot(y2, y3, y4, y1, "y2", "#33A02C", "#FB9A99", "#FDBF6F", "#A6CEE3")
smallPlot(y3, y4, y1, y2, "y3", "#E31A1C", "#FDBF6F", "#A6CEE3", "#B2DF8A")
smallPlot(y4, y1, y2, y3, "y4", "#FF7F00", "#A6CEE3", "#B2DF8A", "#FB9A99")
| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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