74 lines
2.2 KiB
Mathematica
74 lines
2.2 KiB
Mathematica
|
|
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','<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>','Color',[1 1 1]);
|
|||
|
|
|
|||
|
|
% Create axes
|
|||
|
|
axes1 = axes('Parent',figure1,'XTickLabel',{'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>A','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>B','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>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','<EFBFBD><EFBFBD>1');
|
|||
|
|
set(bar1(2),...
|
|||
|
|
'FaceColor',[0.941176474094391 0.941176474094391 0.941176474094391],...
|
|||
|
|
'DisplayName','fdsfsd');
|
|||
|
|
|
|||
|
|
% Create xlabel
|
|||
|
|
xlabel('<EFBFBD><EFBFBD><EFBFBD><EFBFBD>','FontSize',12,'FontName','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
|
|||
|
|
% Create ylabel
|
|||
|
|
ylabel('ʱ<EFBFBD><EFBFBD>/ms','FontSize',12,'FontName','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
|
|||
|
|
% 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');
|
|||
|
|
|