필터 지우기
필터 지우기

How to plot overlapped graphs better?

조회 수: 16 (최근 30일)
Ararat Cetinkaya
Ararat Cetinkaya 2022년 1월 20일
댓글: Voss 2022년 1월 21일
I have a two different data called Desired and Simulated output. The difference between the data is around 0.003-0.006 and I want to plot these two data in the same graph. Since the difference between them is very small, they overlap with each other as seen below on the graph. how to properly plot these two data in one graph.
figure(3)
plot(t,mu_true,"b-"); hold on
plot(t,mu_predicted , "r-");
xlabel('t'); ylabel('result 1')
legend('desired output', 'simulated output');

답변 (1개)

Voss
Voss 2022년 1월 21일
Maybe make top line dotted:
figure(3)
plot(t,mu_true,"b-"); hold on
plot(t,mu_predicted , "r:");
xlabel('t'); ylabel('result 1')
legend('desired output', 'simulated output');
  댓글 수: 2
Ararat Cetinkaya
Ararat Cetinkaya 2022년 1월 21일
I tried to use different types of lines but still it doesn't look good.
Voss
Voss 2022년 1월 21일
You might also try making the line underneath wider:
figure(3)
plot(t,mu_true,"b-",'LineWidth',3); hold on
plot(t,mu_predicted , "r:");
xlabel('t'); ylabel('result 1')
legend('desired output', 'simulated output');

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by