How to merge plots from different scripts

19 views (last 30 days)
I have different scripts of different algorithms with each showing plots of single algorithm outputs. I want to plot them in single figure with legends like shown in attachment
  2 Comments
Yevgeny Gayev
Yevgeny Gayev on 18 Mar 2023
As far as I understand, your problem has been associated with the fact that values on the left figure are about 100 times more than those on the right. That's why it is different to compare them.
A typical work arround in such a case is using logarithmical coordinates. So calculate Y=log(OF) for all the curves and plot them, for example, with
plot(t,Y1,t,Y2,t,Y3, ... ,t,Y100,).
Good luck!

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 17 Mar 2023
I do not see the attachment.
However the easiest way mightr be to save the data from each script to .mat files, and then load them into one or the other scripts, or a completely new script, and plot them there.
.
  4 Comments
Star Strider
Star Strider on 18 Mar 2023
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

Sign in to comment.

More Answers (0)

Communities

More Answers in the  Distance Learning Community

Categories

Find more on 2-D and 3-D 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!