Trying to change colours on the the same plot, but getting error message 'There is no b property on the Line class'
Mostra commenti meno recenti
I am trying to create a plot which has all of the values negative values below 0 in red, and those positive, above 0 in blue.
However when I try to do this using 'b' for blue and 'r' for red, I am met with the message 'There is no b property on the Line class'
Unsure of where I'm going wrong if someone could please assist
figure((iSubject-2)*100 + (iTest-4)*10 + (iGroup-2))
subplot(511)
plot(acc(:,1))
title('lower back')
positiveIndexes = 2 >= 0;
negativeIndexes = 2 <= 0;
hold on
plot(acc(:,1),(positiveIndexes),'b',1)
plot(acc(:,1),(negativeIndexes),'r',1)
Risposta accettata
Più risposte (1)
Cameron Kirk
il 12 Dic 2019
0 voti
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!