pes2014-debug2-laplace/CalTimeBar.m

74 lines
2.2 KiB
Matlab

function createfigure(ymatrix1)
%CREATEFIGURE(YMATRIX1)
% YMATRIX1: bar matrix data
% Auto-generated by MATLAB on 11-Feb-2015 20:23:32
% Create figure
figure1 = figure('Name','最大不平衡量','Color',[1 1 1]);
% Create axes
axes1 = axes('Parent',figure1,'XTickLabel',{'情形A','情形B','情形C'},...
'XTick',[1 2 3],...
'Position',[0.13 0.11 0.29654028436019 0.391061571125265],...
'FontName','Times New Roman');
hold(axes1,'all');
% Create multiple lines using matrix input to bar
bar1 = bar(ymatrix1,'BarLayout','stacked');
set(bar1(1),...
'FaceColor',[0.831372559070587 0.815686285495758 0.7843137383461],...
'DisplayName','阶段1');
set(bar1(2),...
'FaceColor',[0.941176474094391 0.941176474094391 0.941176474094391],...
'DisplayName','fdsfsd');
% Create xlabel
xlabel('情形','FontSize',12,'FontName','黑体');
% Create ylabel
ylabel('时间/ms','FontSize',12,'FontName','黑体');
% Create textbox
annotation(figure1,'textbox',...
[0.166919431279624 0.371781316348195 0.0888625592417062 0.059447983014862],...
'String',{'29.68ms'},...
'FontName','Times New Roman',...
'LineStyle','none');
% Create textbox
annotation(figure1,'textbox',...
[0.16706161137441 0.262269639065817 0.0888625592417062 0.059447983014862],...
'String',{'70.16ms'},...
'FontName','Times New Roman',...
'LineStyle','none');
% Create textbox
annotation(figure1,'textbox',...
[0.243791469194317 0.353904458598726 0.0888625592417062 0.059447983014862],...
'String',{'31.66ms'},...
'FontName','Times New Roman',...
'LineStyle','none');
% Create textbox
annotation(figure1,'textbox',...
[0.243933649289103 0.244392781316348 0.0888625592417062 0.059447983014862],...
'String',{'68.48ms'},...
'FontName','Times New Roman',...
'LineStyle','none');
% Create textbox
annotation(figure1,'textbox',...
[0.314881516587683 0.343288747346072 0.0888625592417062 0.059447983014862],...
'String',{'30.08ms'},...
'FontName','Times New Roman',...
'LineStyle','none');
% Create textbox
annotation(figure1,'textbox',...
[0.315023696682469 0.233777070063694 0.0888625592417062 0.059447983014862],...
'String',{'65.16ms'},...
'FontName','Times New Roman',...
'LineStyle','none');