Plotting multi-colored line in Matlab
Posted
by Jonas
on Stack Overflow
See other posts from Stack Overflow
or by Jonas
Published on 2010-03-15T01:25:17Z
Indexed on
2010/03/15
1:29 UTC
Read the original article
Hit count: 597
I would like to plot a line with two-color dashes, say red-blue-red-blue-...
I know I could do it like this:
plot([1,2],[1,2],'r'),
hold on,
plot([1,2],[1,2],'--b')
However, since I need to be able to move the line, among others, it should only have a single handle. How could I do this?
© Stack Overflow or respective owner