clc;clear all;close all; %初始化 清屏,清理数据,关闭窗口,
data = [0.796 0.739;
0.778 0.778;
0.655 0.589;
0.712 0.667;
0.892 0.812;
0.903 0.822;
0.931 0.846]; %载入数据
bar(data); %绘图(直方图)
%设置横坐标标签
set(gca,'XTickLabel',{'CKE','SHINE','DKE','PER','LibFM','Wide&Deep','ReBKC'})
%设置横坐标标签倾斜,顺时针倾斜45度
set(gca,'XTickLabelRotation',45);
%隐藏figure右侧和上侧边框
set(gca, 'Box', 'off')
%设置Y轴名称
%hl = ylabel('ACC unit : 100%' ,'FontName','Times New Roman', 'Fontsize',14);
hl = ylabel('ACC unit : 100%');
%图例
%SouthOutside 表示图片正下方生成图例
lgd = legend('ACC','ACU','Location','SouthOutside');
%图例布局,水平
set(lgd, 'Orientation', 'horizon');
%隐藏图例方框
set(lgd , 'Box', 'off');
数据来源
[1] B. Hui, L. Zhang, X. Zhou, X. Wen, and Y. Nian, “Personalized recommendation system based on knowledge embedding and historical behavior,” Appl. Intell., vol. 52, no. 1, pp. 954–966, 2022, doi: 10.1007/s10489-021-02363-w.