条形图的填充色应该选“无”,而不是白色
close all; %关闭所有图形
clear all; %清除所有变量
clc;
%% 事件请求
A = 0 + (90-0).*rand(1,10)
B = ceil(1 + (6-1).*rand(1,10))
axis([0 100 0 7])
set(gca,'XTick',[0:10:100])
set(gca,'YTick',[0:2:8])
for i=1:1:10
hold on
a= bar(A(i)+5,B(i),10,'linewidth',1.5,'FaceColor','none','EdgeColor','black');
end
ylabel('优先级')
xlabel('时间(ms)')