Vizzlo's slopegraph will help you to tell a story about change. It is an elegant visualization; highly regarded by data visualization experts. In this tutorial we'll explain what a slopegraph is, when to use it, and how to create it.
(Liverpool plays an incredible season. So does Leicester)
What is a slopegraph?
A slopegraph is visualization that most commonly tells a before and after story. Let's start Edward Tufte's classic, taken from his book The Visual Display of Quantitative Information, p. 158. Take the following data
It is hard to see any pattern just by looking at the data, of course.
A first try - grouped bars
We can abstract these numbers into a graphic using a grouped bar chart:
The chart gives a first indication about our variable of interest. Yet, it focuses on the absolute numbers. It is not easy to see how the numbers changes between the years 1970 and 1979. Visually, the height of the bars clearly outweighs the difference between the groups.
Second try - a range plot
A better way to emphasize the group differences is by means of a range plot. A range plot is essentially a connected dot plot.
A range plot is already an improvement over the grouped bars. The chart focuses on the gap, not on the absolute numbers. Still, there are a few patterns in the data that are hard to find. (Did you find Britain outstanding?)
A case for a slopegraph
A slopegraph focuses on change. Here is Tufte's example:
The same data visualized this way reveals a lot more information. Read the chart form left to right, or from top to bottom. You clearly see now
- the ranking of each country in 1970 and 1979, if we read the graph vertically
- the specific values associated with each country and year
- compare how the rates have changed if you look at the slopes
- that the United Kingdom is the only notable deviation in the general trend
How to create a slopegraph with Vizzlo?
We saw earlier that when you create a slopegraph with Vizzlo your data needs to be arranged as follows:
|Label||Value 1||Value 2|
You can paste the data into the spreadsheet or upload a XLSX or CSV file.
Tip: Read our article about How to upload your data to Vizzlo.
Customize your slopegraph
The chart offers you many customization options. You can
— position the axis legend labels on top or bottom of the chart
— display labels and values on either side or hide them
— adjust the line width for all slopes simultaneously or for a single slope alone.
The chart is interactive, just click on any line to change its properties:
— line width
If you want to use different colors to emphasize increases, decreases or equal values, click on the `Colors` toggle. Three color input will appear so you can customize the chart.
Sometimes your data contains ranks rather than continues values. In such a case you would probably want to invert the axis such that the first rank is displayed on top. Take the Premier League example from the beginning of this text. Instead of points, we look at the position of each team now. You would usually show the lead on top.
|Brighton and Hove||15||13|
In the sidebar, click on Axis --> Inverted axis to show the ranks correctly from top to bottom. Note that the colors for increasing and decreasing values won't be reversed automatically.
"I love slopegraphs. I'm happy to nail my colours to the mast and declare it. I'd probably not go as far as to wear a t-shirt with such a slogan but I feel a need to express my praise for the still-underused slopegraph and try help continue spread the word of its worth."