How to Make a Multi-line Step Chart in R
For the times your data represents immediate changes in value.
The step chart is a way to show immediate changes in value over time and can be good for discrete values. For example, postage prices change right away, but if you were to show it with a line chart, it would look like the price steadily rose.
In R, to show a single step line, you can use the
plot() function and set the
type to “s”. However, to draw multiple step lines, you take a few extra steps.
To access this full tutorial and download the source code you must be a member. (If you are already a member, log in here.)
Gain instant access to step-by-step visualization courses and tutorials for insight and presentation — all while supporting an independent site. Source code and data is included so that you can more easily apply what you learn in your own work.
Members also recieve a weekly newsletter, The Process, which looks more closely at the tools, the rules, and the guidelines and how they work in practice.
See samples of everything you gain access to:
More Tutorials See All →
Transitioning Map, Part 1: Mapping Irregular Data with Interpolation in R
Rarely do you have evenly-spaced data across an entire geographic space. Here is a way to fill in the gaps.
Getting Started with Charts in R
You get a lot of bang for the buck with R, charting-wise, but it can be confusing at first, especially if you’ve never written code. Here are some examples to get started.
Animated Pyramid Chart in R
Make a bunch of charts, string them together like a flip book, and there’s your animation. Sometimes good for showing changes over time. Always fun to play with.