How to plot overlapped graphs better?
16 次查看(过去 30 天)
显示 更早的评论
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');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/868780/image.png)
0 个评论
回答(1 个)
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 个评论
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');
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!