How do I make plot lines different colors?

2 Ansichten (letzte 30 Tage)
Ethan Postans
Ethan Postans am 5 Dez. 2018
Kommentiert: madhan ravi am 5 Dez. 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.

Akzeptierte Antwort

madhan ravi
madhan ravi am 5 Dez. 2018
Bearbeitet: madhan ravi am 5 Dez. 2018
plot(x,y,'r') % r indicates red color see the link for more info

Weitere Antworten (0)

Kategorien

Mehr zu Discrete Data Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by