matlab">clc
clear
close all
load('MyColor.mat') for iloop = 1:25 data0(iloop) = {readtable('data.xlsx','sheet',iloop)};
end
count=zeros(23,14);
for iloop = 1:25index(iloop) ={ cell2mat(table2array(data0{1,iloop}(1,1)))};data(iloop) = { flipud(data0{1,iloop}(2:end,2:end))};count = count+table2array( flipud(data0{1,iloop}(2:end,2:end)));
end
country = flip(table2array(data0{1,1}(2:end,1)));
year = table2array(data0{1,1}(1,2:end));
x_lim = [0.5:14.5];
y_lim = [0.5:23.5];
figure('Position',[50 50 1000 1000]) ax1=axes('Position',[0.72 0.100 0.2 0.6],...'XAxisLocation','bottom','YAxisLocation','left','Color','none','XColor','k','YColor','k','XTick',[],'YTick',[]); ax2=axes('Position',[0.12 0.7 0.6 0.2],...'XAxisLocation','bottom','YAxisLocation','left','Color','none','XColor','k','YColor','k','XTick',[],'YTick',[]); ax3=axes('Position',[0.12,0.1,0.6,0.6],'XColor','k','YColor','k');
for iloop = 1:length(y_lim)h=yline(y_lim(iloop),'-');hold onh.Alpha=0.4;
endfor iloop = 1:length(x_lim)h=xline(x_lim(iloop),'-');hold on;h.Alpha=0.4;
end
for jloop=1:14for iloop=1:23x_random(iloop,jloop)={ randany( x_lim(jloop), x_lim(jloop+1), count(iloop,jloop) )};y_random(iloop,jloop)={ randany( y_lim(iloop), y_lim(iloop+1), count(iloop,jloop) )};end
end
在这里插入代码片