How to plot the difference between two plots (using shade)
이전 댓글 표시
Hello everyone, I have two plots like this:
plot(OBS,'Color','#007aa5')
hold on
plot(Modeled,'Color','#ff55a3')
xlabel('time step')
Now I want to illustrate the difference between these two plots by shade like the following example:

Where plot 2 is less than plot1, the difference determines by yellow sahde and where plot 2 is greater than plot1difference determine using green shade.
I attached my datasets,
Thank you in advance
댓글 수: 1
Ravi Narasimhan
2021년 10월 4일
편집: Ravi Narasimhan
2021년 10월 4일
Try the solution by @Image Analyst in https://www.mathworks.com/matlabcentral/answers/180829-shade-area-between-graphs
You may need to adapt it for your case to get the different colors.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


