How do I make plot lines different colors?

2 views (last 30 days)
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.

Accepted Answer

madhan ravi
madhan ravi on 5 Dec 2018
Edited: madhan ravi on 5 Dec 2018
plot(x,y,'r') % r indicates red color see the link for more info

More Answers (0)

Categories

Find more on Discrete Data Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!