matlabコード
clear;close all
filename=’data.csv’;
T=readtable(filename);
x=T.AgeGroup;
y=T.Population;
fig=figure;
f=bar(x,y);
ylim([0 15e6])
ax=gca;
ax.FontSize=14;
ax.FontName=’Times New Roman’
f.FaceColor=’#009E73′
f.FaceAlpha=0.5
f.EdgeColor=’#009E73′
ax.Title.String=[‘Population Distribution’,char(10),’by Age Group in a Country’];
ax.Title.FontSize=20;
ax.Title.FontName=’Times New Roman’;
ax.XLabel.String=’Age group’;
ax.XLabel.FontSize=18;
ax.XLabel.FontName=’Times New Roman’;
ax.XLabel.FontWeight=’bold’;
ax.YLabel.String=’Population’;
ax.YLabel.FontSize=18;
ax.YLabel.FontName=’Times New Roman’;
ax.YLabel.FontWeight=’bold’;