-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_2line.m
More file actions
22 lines (22 loc) · 727 Bytes
/
plot_2line.m
File metadata and controls
22 lines (22 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function plot_2line(x,y1,y2,label_x,label_y,legend_y1,legend_y2,ylabel_position)
figure
set(gcf,'PaperUnits','inches','PaperPosition',[100 100 520 440],'PaperPositionMode','auto');
set(gcf)
subplot(2,1,1)
%set(gcf,'DefaultTextInterpreter','latex' )
plot(x,y1,'linewidth',1)
ylabel(label_y(1),'position',ylabel_position(1,:));
if legend_y1 ~= [""]
legend(legend_y1)
end
set (gca,'position',[0.1,0.6,0.8,0.37],'fontsize', 12,'linewidth',0.5)
subplot(2,1,2)
plot(x,y2,'linewidth',1);
xlabel(label_x);
ylabel(label_y(2),'position',ylabel_position(2,:))
if legend_y2 ~= [""]
%,'interpreter','latex'
legend(legend_y2)
end
set (gca,'position',[0.1,0.12,0.8,0.37] ,'fontsize',12,'linewidth',0.5)
end