
axis([0 1 0 0.7]);hold on;
%axis square;
   axis off;
% 来自stata程序模块4 正文图4b，配套，第一列为I0的4分类占比，第二列为I1的4分类占比
 a=[
0.5555556	0.5238096
0.1604938	0.1785714
0.0987654	0.0714286
0.1851852	0.2261905
];
 
y1=a(:,1);
y2=a(:,2);
x=[1 2 3 4];
high=0.9;

hold off; 
%% 棰滆壊瀹氫箟
% colorplus鍑芥暟鑾峰彇鏂瑰紡锛?
% 鍏紬鍙峰悗鍙板洖澶嶏細450


%% 鍥剧墖灏哄璁剧疆锛堝崟浣嶏細鍘樼背锛?
figureUnits = 'centimeters';
figureWidth = 12;
figureHeight = 12;

%% 绐楀彛璁剧疆
figureHandle = figure;
set(gcf, 'Units', figureUnits, 'Position', [0 0 figureWidth figureHeight]); % define the new figure dimensions
hold on

%% 鏌辩姸鍥撅紙鍙犲姞锛夌粯鍒?
b1 = bar(x,y1,0.3);
hold on
b2 = bar(x,y2,0.15);
%plot([2 2], [0 1],'-k');
%% 缁嗚妭浼樺寲
% 璧嬭壊+杈圭紭璋冩暣
set(b1,'FaceColor',[0.75 0.75 0.75], 'EdgeColor',[0.75 0.75 0.75], 'LineWidth',1.5)
set(b2,'FaceColor',[0 0 0], 'EdgeColor',[0.85 0.85 0.85], 'LineWidth',1)

% 鍧愭爣杞寸編鍖?
set(gca, 'Box', 'off', ...                                         % 杈规
         'XGrid', 'off', 'YGrid', 'off', ...                       % 缃戞牸
         'TickDir', 'out', 'TickLength', [.01 .01], ...            % 鍒诲害
         'XMinorTick', 'off', 'YMinorTick', 'off', ...             % 灏忓埢搴?
         'XColor', [.1 .1 .1],  'YColor', [.1 .1 .1],...           % 鍧愭爣杞撮鑹?
         'XTick', 1:4,...                                         % 鍒诲害浣嶇疆銆侀棿闅斻?鑼冨洿
         'YTick', 0:0.2:0.8,...                                      
         'Xlim' , [0 5],...
         'Ylim' , [0 0.8], ...
         'xticklabel',{'[0,6)','6','(6,12)','12'}, ...                                % X鍧愭爣杞村埢搴︽爣绛?
         'Yticklabel',{0:0.2:0.8})                                   % Y鍧愭爣杞村埢搴︽爣绛?
hLegend = legend(sprintf('I0'), 'I2','orientation','horizontal','Location','southoutside');

%hXLabel = xlabel('配套补贴制度下捐赠净支出分布');
hYLabel = ylabel('占比');

% 瀛椾綋鍜屽瓧鍙?
set(gca, 'FontName', 'Helvetica')
set([hYLabel], 'FontName', 'AvantGarde')
set([hLegend, gca], 'FontSize', 12)
set([hYLabel], 'FontSize', 12)


% 鑳屾櫙棰滆壊
set(gcf,'Color',[1 1 1])

%% 鍥剧墖杈撳嚭
figW = figureWidth;
figH = figureHeight;
set(figureHandle,'PaperUnits',figureUnits);
set(figureHandle,'PaperPosition',[0 0 figW figH]);

pathTOsave='D:\Research\coinvest\withHWX\投稿经济学季刊\拟刊修改\code\matlab\Figures';  %根据实际情况更换路径，路径不可含中文
%saveas(gcf, strcat(pathTOsave,'\Figure3b_BarNetdonateM4_M_I1','.eps'),'psc2');
%saveas(gcf, strcat(pathTOsave,'\Figure3b_BarNetdonateM4_M_I1','.pdf'))
saveas(gcf, strcat(pathTOsave,'/Figure4b_BarNetdonateM4_M_I1','.png'));