-
Notifications
You must be signed in to change notification settings - Fork 1
/
wh_bar.m
64 lines (57 loc) · 3.37 KB
/
wh_bar.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%%武汉红十字 收支情况分析
% b=[1,84.1666666666667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11578,13786152.9000000,0,0,0;
% 2,80.8000000000000,1207,210783.190000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16638,19206664.4100000,0,0,0;
% 3,77.6923076923077,49691,4761028.68000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13896,50837618.7000000,0,0,0;
% 4,74.8148148148148,23772,2605009.45000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8015,53403774.8800000,0,0,0;
% 5,72.1428571428571,18893,2300481.90000000,0,0,0,2856,314540755.690000,746,61609585.0500000,48740,10272810.3300000,0,0,386423151.070000,332508551.070000,0,3876,80266415.4400000,0,53914600,53914600;
% 6,69.6551724137931,13325,2173942.33000000,229,145173.390000000,70800,1076,64842370.6400000,147,12926076.1100000,11666,3774236,83932598.4700000,13118,470355749.540000,416441149.540000,0,0,85501100,0,0,53914600;
% 7,67.3333333333333,9555,1712639.86000000,0,0,0,1098,125782294.950000,151,5709030.14000000,2941,1486582,134690546.950000,4190,605046296.490000,446453796.490000,134690500,0,379055000,0,104677900,158592500;
% 8,65.1612903225806,0,0,1,5000,0,1343,79369992.8800000,111,3786082.36000000,1662,912205.010000000,84073280.2500000,3117,689119576.740000,327374676.740000,80622600,0,699531100,0,203152400,361744900;
% 9,1010,0,0,0,0,0,623,17380578.3900000,63,691209.170000000,1216,491540.200000000,18563327.7600000,1902,707682904.500000,345938004.500000,19458100,0,718989200,0,0,361744900;
% 10,505,0,0,0,0,0,326,144137445.300000,34,233915.020000000,502,166548,144769839.320000,864,852452743.820000,485607843.820000,144959800,875,863949000,33133,5100000,366844900];
%
clear
b=xlsread('wuhan_redcorss_2_5.xlsx');
[x,s]=size(b);
temp_high(:,1) = b(:,20)./100000000;
temp_high(:,2) = b(:,16)./100000000;
w1 = 0.5;
bar(temp_high);
set(gca,'xticklabel',{'1月24日','1月25日','1月26日','1月27日','1月28日','1月29日','1月30日','1月31日','2月1日','2月2日','2月3日'});
hold on
plot(5:1:x,b(5:x,13)./100000000,'-ob',2:1:7,b(2:7,4)./100000000,'-*g',5:1:x,b(5:x,11)./100000000,'-rd',5:1:x,b(5:x,9)./100000000,'-kp','LineWidth',1.5); %线性,颜色,标记
grid on
title('武汉市红十字会 捐赠收入情况')
ylabel('金额(亿)')
legend({'官方公示的累计收到捐款','实际的累计收到捐款','支付宝','微信、pos机','农业银行','交通银行'},'Location','northwest')
%
figure;
plot(5:1:x,b(5:x,12),'-ob',2:1:7,b(2:7,3),'-*g',5:1:x,b(5:x,10),'-rd',5:1:x,b(5:x,8),'-kp','LineWidth',1.5); %线性,颜色,标记
grid on
set(gca,'xticklabel',{'1月25日','1月26日','1月27日','1月28日','1月29日','1月30日','1月31日','2月1日','2月2日','2月3日'});
title('武汉市红十字会--收到社会捐款次数变化趋势')
ylabel('捐款人(团体)数')
legend({'支付宝','微信、pos机','农业银行','交通银行'},'Location','northwest')
%
figure;
aa(:,1)=b(:,17)./100000000;
aa(:,2)=-b(:,17)./100000000;
aa(:,3)=-b(:,23)./100000000;
bb = 1:1:x;
bar(bb,aa,'stacked'); %,'stacked' stacks values in each row together
ylim([-10 10]);
title('武汉红十字会--收支情况')
hold on
set(gca,'xticklabel',{'1月24日','1月25日','1月26日','1月27日','1月28日','1月29日','1月30日','1月31日','2月1日','2月2日','2月3日'});
ylabel('发放(亿) 剩余(亿)')
legend({'累计收到捐款总数','结余数额','累计发放数额'},'Location','northwest')
%legend([aa aa],{'First','Third'})
%
yyaxis right
x=1:1:x;
y=b(:,23)./b(:,16);
plot(x,y,'-o','LineWidth',2,'DisplayName','发放比例');%运作效率
ylim([-1 1]);
grid on
ylabel('捐款发放效率')
%legend({'Label1','NumColumns','Label3','Label4'},'NumColumns',2)