How to plot overlapping parallel lines with a small offset to make them all visible?

I'm plotting (with "stairs") several linear functions in the same plot which occasionally overlap. This make the plot hard to read since then only the last plotted line is visible when the functions have the same values.
What I'm looking for is a way to tell the plot/stairs function to recognize that my lines are parallel and overlapping and then plot the lines over and under each other as they were a multicoloured thicker line.
Edit: A simple picture describing the problem is found here.

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 29 Nov. 2011
plot() or stairs() can't do that, as others might just want the opposite. You have to process it yourself by adding an offset, or consider using the line style and data point marker.

Kategorien

Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 29 Nov. 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by