% demo 3
% @author : slandarer
% @修改和扩展:xiangyuchen90s
X1=randi([1,500],[100,1]);
X2=randi([1,500],[100,1]);
X3=randi([1,500],[100,1]);
X4=randi([1,500],[100,1]);
X5=randi([1,500],[100,1]);
X6=randi([1,500],[100,1]);
X7=randi([1,500],[100,1]);
XX={X1,X2,X3,X4,X5,X6,X7};
VN=venn(XX{1:4});
VN=VN.labels('AAA','BBB','CCC','DDD');
VN=VN.draw();
colorList=[78 101 155;
138 140 191;
184 168 207;
231 188 198;
]./255;
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i,:))
end
colorList=[102 45 34;
89 56 178;
198 78 88 ;
65 12 110 ;
]./255;
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i,:))
end
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i+1,:))
end
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i+2,:))
end
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i+3,:))
end
colorList=[100 101 155;
138 240 191;
184 168 237;
231 188 198;
]./255;
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i,:))
end
colorList=[100 213 155;
138 240 123;
184 168 142;
231 188 233;
]./255;
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i,:))
end
colorList=[1 2 3;
4 5 6;
7 8 9;
10 11 12;
]./255;
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i,:))
end
colorList=[45 101 102;
178 120 203;
78 88 198;
110 120 130;
]./255;
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i,:))
end
colorList=[45 101 102;
178 89 203;
78 88 198;
110 65 130;
]./255;
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i,:))
end
colorList=[45 34 102;
178 89 56;
78 88 198;
110 65 12;
]./255;
for i=1:4
VN.setPatchN(i,'FaceColor',colorList(i,:),'EdgeColor',colorList(i,:))
end
开发工具:MATLAB 2022b
微信Alt+A截屏工具