2 different legend on the same graph for the same data
I have a code which generates 2 plots with the same y-axes and x-axes values (see attached figures).
how can I plot only one figure but with the two different legends ?
attached below is my first plot code. the second code lines are similar but they create new plot and the new legend.
10x in advance,
Irad
for j=1:dpointsnum
plot(totxdata,totydata1(j,:),’linestyle’,getprop(lines,1),…
‘Color’,getprop(colors,j)); hold on;
end
grid(gca,’minor’);
xlabel(‘ncdotM’,’FontName’,’Arial’,’FontWeight’,’bold’,’FontSize’,12);
ylabel(‘Ductility ratio, mu’, FontSize=12,FontWeight=’bold’,FontName=’Arial’);
nLeg = legend(Leg); %adding legend entries to the plot
nLeg.Title.String = {‘Scaled distance’;'[m/kg^{1/3}]’}; %adding title to the lgenedI have a code which generates 2 plots with the same y-axes and x-axes values (see attached figures).
how can I plot only one figure but with the two different legends ?
attached below is my first plot code. the second code lines are similar but they create new plot and the new legend.
10x in advance,
Irad
for j=1:dpointsnum
plot(totxdata,totydata1(j,:),’linestyle’,getprop(lines,1),…
‘Color’,getprop(colors,j)); hold on;
end
grid(gca,’minor’);
xlabel(‘ncdotM’,’FontName’,’Arial’,’FontWeight’,’bold’,’FontSize’,12);
ylabel(‘Ductility ratio, mu’, FontSize=12,FontWeight=’bold’,FontName=’Arial’);
nLeg = legend(Leg); %adding legend entries to the plot
nLeg.Title.String = {‘Scaled distance’;'[m/kg^{1/3}]’}; %adding title to the lgened I have a code which generates 2 plots with the same y-axes and x-axes values (see attached figures).
how can I plot only one figure but with the two different legends ?
attached below is my first plot code. the second code lines are similar but they create new plot and the new legend.
10x in advance,
Irad
for j=1:dpointsnum
plot(totxdata,totydata1(j,:),’linestyle’,getprop(lines,1),…
‘Color’,getprop(colors,j)); hold on;
end
grid(gca,’minor’);
xlabel(‘ncdotM’,’FontName’,’Arial’,’FontWeight’,’bold’,’FontSize’,12);
ylabel(‘Ductility ratio, mu’, FontSize=12,FontWeight=’bold’,FontName=’Arial’);
nLeg = legend(Leg); %adding legend entries to the plot
nLeg.Title.String = {‘Scaled distance’;'[m/kg^{1/3}]’}; %adding title to the lgened plot, multipl legends MATLAB Answers — New Questions