Combining charts for comparison
Show older comments
I want to combine 4 charts as per attached. The charts are extracted from running the attached code by changing K, C between 0 and 1. But the result shows 1 chart only. How to fix please?
Code to combine:
if true
fig = figure(10);
ax = axes(fig);
xlabel('\tau');
ylabel(' \Psi(0,\tau)');
title('Injection rate vs. K, C');
h1 = openfig('K0C0.fig','reuse');
h2 = openfig('K0C1.fig','reuse');
h3 = openfig('K1C0.fig','reuse');
h4 = openfig('K1C1.fig','reuse');
copyobj(h1.Children.Children,ax);
copyobj(h2.Children.Children,ax);
copyobj(h3.Children.Children,ax);
copyobj(h4.Children.Children,ax);
close(h1);
close(h2);
close(h3);
close(h4);
savefig('ratevsKC');
end
hold on
legend('K=0,C=0','K=0,C=1','K=1,C=0','K=1,C=1','location', 'southeast')
Combined result:

Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!