How do I make plot lines different colors?

2 vues (au cours des 30 derniers jours)
Ethan Postans
Ethan Postans le 5 Déc 2018
Commenté : madhan ravi le 5 Déc 2018
I have this code:
clc
clear
close all
%Column1: Time data (units = seconds)
%Column2: Shank Angle (units = degrees)
load data_set3.dat
%RAW Shank Data
time = data_set3(:,1);
shank = data_set3(:,2);
%Cutoff frequency number 1
Freq_1 = bw_filter(shank,90,15,'low',2);
%Cutoff frequency number 2
Freq_2 = bw_filter(shank,90,25,'low',2);
%Cutoff Frequency number 3
Freq_3 = bw_filter(shank,90,35,'low',2);
figure(2)
subplot(3,1,1)
plot(Freq_1),title('Frequency Figure 1'),xlabel('time'),ylabel('shank degrees')
subplot(3,1,2)
plot(Freq_2),title('Frequency Figure 2'),xlabel('time'),ylabel('shank degrees')
subplot(3,1,3)
plot(Freq_3),title('Frequency Figure 3'),xlabel('time'),ylabel('shank degrees')
I want to make the line for the raw frequency one color, and the line for the filtered frequency a different color.

Réponse acceptée

madhan ravi
madhan ravi le 5 Déc 2018
Modifié(e) : madhan ravi le 5 Déc 2018
plot(x,y,'r') % r indicates red color see the link for more info
  2 commentaires
Ethan Postans
Ethan Postans le 5 Déc 2018
Thank you!
madhan ravi
madhan ravi le 5 Déc 2018
Anytime :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Discrete Data Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by