Question
I was just wondering if there is a way to change a particular part of a plot to another color? Suppose we have a plotted signal in BLUE and we wannan show the main response (let's say with the highest amplitude) in RED.
Related Questions
Expert Answer
Prashant Kumar
PhD Expert
Answered Aug 15, 2026
You can draw different lines.
t = 0: 0.02: 4 * pi; y = sin (t); index = (y >= 0); plot(t, y, 'b'); plot(t(index), y(index), 'r');
Have a different question? Ask here