.rtcContent { padding: 30px; } .lineNode {font-size: 12pt; font-family: "Times New Roman", Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal; }
%
clear;clc;close all;
data1 = 500*rand(100,1,1);
data2 = 500*rand(100,1,1);
data3 = 500*rand(100,1,1);
data = [data1 data2 data3];
% 画图
close all
figure
% doc bar
bar(data)
clear;clc;close all;
% 数据构造
x=0:0.1:2*pi;
data1 =sin(x);
data2=cos(x);
data3 = sin(x)+cos(x);
data = [data1; data2; data3];
% 画图
close all
figure
set(gcf,'position',[50 50 850 650 ],'color','w')
% doc bar
bar(data')
legend('day5','day10','day15')
set(gca,'xtick',[1:5:63],'XTickLabel',1:30,'ytick',-1.5:0.5:1.5,'YTickLabel',0:500)
xlabel('age(days)')
ylabel('frequency of occurence')
export_fig('bar.jpg')