3
$\begingroup$

Suppose we have $10$ boxes and we are interested in measuring the number of apples, oranges and pears in each. What is a good way to visualize how the boxes relate to each other in terms of the distribution of fruits? For example, box 1 might have 5 apples, 10 oranges, and 6 pears while box 10 might have 1 apple, 1 orange and 1 pear.

Added. Is looking at a distance matrix appropriate? Is there a way to visualize a distance matrix?

$\endgroup$
2
  • $\begingroup$ With numbers so small, why is a table a bad option? $\endgroup$
    – AdamO
    Commented Apr 12, 2013 at 20:48
  • 1
    $\begingroup$ A table could work fine too. $\endgroup$
    – Nick Cox
    Commented Apr 12, 2013 at 23:51

2 Answers 2

3
$\begingroup$

What about a spineplot? That way you can simultaneously display both the differences in proportions per box and differences in the size of the boxes. Your example with two boxes would look like this:

enter image description here

$\endgroup$
1
  • $\begingroup$ Can you make spine plots in SPSS? $\endgroup$ Commented Apr 12, 2013 at 16:34
3
$\begingroup$

I agree broadly with Maarten, as a click on his link will imply, but other answers are possible.

Note first that many people would regard a spineplot as just a special case of a mosaic plot. Programs or functions in your favourite software are perhaps more likely to use the second term.

That said, a good old-fashioned bar chart or (Cleveland) dot chart can work as well here as anything else, although some designs are better than others. In particular, stacked (divided) bar charts divide the world: some love them, some hate them.

Pie charts? Just say no.

Yet further, your question leaves open quite what you want your graph to show. Do you want to emphasise frequencies or to emphasise proportions or (quite reasonably) to have it both ways? The spineplot implementation in Stata used by Maarten can show absolute numbers as well as conveying the fractional breakdown, and that's surely a standard feature in other environments.

$\endgroup$
7
  • $\begingroup$ Can you do it in SPSS? $\endgroup$ Commented Apr 12, 2013 at 16:32
  • $\begingroup$ Sorry, haven't used SPSS for about 30 years. Someone else may know. $\endgroup$
    – Nick Cox
    Commented Apr 12, 2013 at 16:42
  • $\begingroup$ Poster asked about whether a distance matrix would be useful. Depends on the problem and what kind of distance matrix. Your question is about visualizing a two-way table of counts. If you have some other question in mind, best to give us much more background. $\endgroup$
    – Nick Cox
    Commented Apr 12, 2013 at 16:45
  • $\begingroup$ SPSS has no native implementation of the spineplot @guestoiejroe (unfortunately there is no magical "Mosaic" coordinate system as Wilkinson displays in his Grammer book). I would suggest piggy-backing on the R vcd library (that is calling R code from SPSS). While I am here though, I was working on an implementation of one the other day in SPSS, so a question to Dr. Cox - how do you do your default ordering of the categories? $\endgroup$
    – Andy W
    Commented Apr 12, 2013 at 16:49
  • $\begingroup$ @Nick Cox: I want to see how similar a box is to another box. So it seems that using a Euclidean distance similarity matrix would be good. $\endgroup$ Commented Apr 12, 2013 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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