List plot joined with stair steps instead of diagonal lines

What’s a simple way to plot a list of points so that they’re joined with stair steps instead of straight lines between the points?

I’d imagine something like…

stairStepListPlot[{{0,0},{1,1},{2,2}}]

…would produce a flat line from {0,0} to {1,0}, then a vertical line from {1,0} to {1,1} and so on.

Can you find a concise way of producing such a plot?

=================

  

 

ListPlot[{{0, 0}, {1, 1}, {2, 2}}, InterpolationOrder -> 0, Joined -> True]
– ssch
Sep 18 ’13 at 1:36

  

 

Perfect! Want to put that in an answer and I’ll accept it?
– Sean Madsen
Sep 18 ’13 at 1:38

1

 

Possible duplicates: 30055, 864
– Michael E2
Sep 18 ’13 at 1:43

=================

1 Answer
1

=================

ListPlot can do this with the option InterpolationOrder -> 0

ListPlot[
{{0, 0}, {1, 1}, {2, 2}},
InterpolationOrder -> 0,
Joined -> True]