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.

Réponses (1)

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.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Question posée :

le 29 Nov 2011

Community Treasure Hunt

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

Start Hunting!

Translated by