How do I make plot lines different colors?
조회 수: 2 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
madhan ravi
2018년 12월 5일
편집: madhan ravi
2018년 12월 5일
plot(x,y,'r') % r indicates red color see the link for more info
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!