# What's the correct way to visualize discrete variables?

For example, when visualizing the GDP or GDP per capita of different countries, I often see a line plot (or a radar chart), where the x-axis (or the angular direction) is for countries and the y-axis (or the radial direction) is for the values of GDP or GDP per capita. I don't think this is perfect because the values between two countries make no sense. So what are better ways to visualize data like in this case?

Update: example data, source

• It may be useful if you provided a small set of data on which suggested vizualizations might be shown. Commented Jan 17, 2015 at 2:54
• Per capita GDP (GDP divided by population) would be my first guess. Commented Jan 17, 2015 at 6:32

There's not 'one correct way'; there are some good ways.

The obvious one to my mind would be a Cleveland dot-chart; it's for displaying numeric data on a factor.

Some people would use a bar chart for this purpose instead. If you have a useful classification (such as by region), you'd split by that classification.

With GDPs (whether raw or per capita), the variable covers several orders of magnitude, so it might make a great deal more sense to look on the log-scale (this also obviates any concerns some people might have with 0 not being on the scale above).

There are several uses in such a plot. 1. explicit comparison between countries (is A larger than B?). 2. extracting a data value (what is A's GDP?).

The Cleveland dotchart (or Cleveland dot plot) is based on research[1] into the kinds of comparisons that people are good at or less good at. We're very good at comparison of position along common scales, slightly less good with relative lengths and quite bad at relative areas or angles. In respect of 1. above this comparison is between the values represented by the points (which point is further to the right). In 2. this comparison is between the point and the parallel axis, both comparisons we're good at. The plot eliminates almost all ink that doesn't serve to directly aid these comparisons.

Quick, which is bigger, lemon or lime?

Very thin bars would make for a very similar sort of plot to a Cleveland dot-chart and can sometimes do well (particularly when both plots include 0), but dotcharts have an advantage when you want to plot several numbers for each country, since they can be represented by different symbols. This advantage is even larger if you're only able to use black and white. You also can't really use a log-scale on bar charts (where does the bottom of the bar start and what does the bar-length represent?) and so it's less suitable for data that spans several orders of magnitude.

[1]: Cleveland W.S. and McGill, R. (1984),
"Graphical Perception: Theory, Experimentation, and Application to the Development of Graphical Methods,"
Journal of the American Statistical Association, 79:387 (Sep.), 531-554.

• To obtain a normalization to 0 you could also plot GDP over/under country X's GDP (per capita). So if you chose the US for example, you could plot each countries GDP over/under that of the USA or even percentage points over/under the US. Alternatively you can express each country's GDP as % of country X's GDP. Commented Jan 17, 2015 at 6:05
• I considered this but I think the dots are less "visible" than the lines (though the usage of lines is improper). Commented Jan 17, 2015 at 13:08
• +1 for the "There's not one 'correct' way" portion of your answer. Commented Jan 18, 2015 at 2:17
• @Alexis I mean when lines are used, the values between two "knots" make no sense, which is misleading. Commented Jan 18, 2015 at 2:26
• ziyuang -- I have since included an explicit reference to some of the relevant research. Commented Jan 18, 2015 at 3:24