80 lines
2.0 KiB
Matlab
80 lines
2.0 KiB
Matlab
function createfigure(xvector1, yvector1, xvector2, yvector2, xvector3, yvector3)
|
|
%CREATEFIGURE(XVECTOR1,YVECTOR1,XVECTOR2,YVECTOR2,XVECTOR3,YVECTOR3)
|
|
% XVECTOR1: bar xvector
|
|
% YVECTOR1: bar yvector
|
|
% XVECTOR2: bar xvector
|
|
% YVECTOR2: bar yvector
|
|
% XVECTOR3: bar xvector
|
|
% YVECTOR3: bar yvector
|
|
|
|
% Auto-generated by MATLAB on 11-Feb-2015 17:21:34
|
|
|
|
% Create figure
|
|
figure1 = figure('Name','电压直方图','Color',[1 1 1]);
|
|
|
|
% Create axes
|
|
axes1 = axes('Parent',figure1,'XTick',[-0.0002 -0.0001 0 0.0001 0.0002],...
|
|
'Position',[0.0920853080568723 0.470619469026549 0.20649289099526 0.372300884955752],...
|
|
'FontSize',13);
|
|
% Uncomment the following line to preserve the Y-limits of the axes
|
|
ylim(axes1,[0 7]);
|
|
box(axes1,'on');
|
|
hold(axes1,'all');
|
|
|
|
% Create bar
|
|
bar(xvector1,yvector1,'FaceColor',[0 0 0],'Parent',axes1);
|
|
|
|
% Create xlabel
|
|
xlabel('误差/p.u','FontSize',13);
|
|
|
|
% Create ylabel
|
|
ylabel('数量','FontSize',13);
|
|
|
|
% Create title
|
|
title('情形A','FontSize',13);
|
|
|
|
% Create axes
|
|
axes2 = axes('Parent',figure1,...
|
|
'Position',[0.350370561164917 0.466814159292035 0.20649289099526 0.372300884955752],...
|
|
'FontSize',13);
|
|
% Uncomment the following line to preserve the X-limits of the axes
|
|
xlim(axes2,[-0.004 0.004]);
|
|
box(axes2,'on');
|
|
hold(axes2,'all');
|
|
|
|
% Create bar
|
|
bar(xvector2,yvector2,'FaceColor',[0 0 0],'Parent',axes2);
|
|
|
|
% Create xlabel
|
|
xlabel('误差/p.u','FontSize',13);
|
|
|
|
% Create title
|
|
title('情形B','FontSize',13);
|
|
|
|
% Create ylabel
|
|
ylabel('数量','FontSize',13);
|
|
|
|
% Create axes
|
|
axes3 = axes('Parent',figure1,...
|
|
'Position',[0.606286146026517 0.463982300884956 0.20649289099526 0.372300884955752],...
|
|
'FontSize',13);
|
|
% Uncomment the following line to preserve the X-limits of the axes
|
|
xlim(axes3,[-0.004 0.004]);
|
|
% Uncomment the following line to preserve the Y-limits of the axes
|
|
ylim(axes3,[0 7]);
|
|
box(axes3,'on');
|
|
hold(axes3,'all');
|
|
|
|
% Create bar
|
|
bar(xvector3,yvector3,'FaceColor',[0 0 0],'Parent',axes3);
|
|
|
|
% Create xlabel
|
|
xlabel('误差/p.u','FontSize',13);
|
|
|
|
% Create ylabel
|
|
ylabel('数量','FontSize',13);
|
|
|
|
% Create title
|
|
title('情形C','FontSize',13);
|
|
|