Matlab画图所用到

画三维柱状图

datafilename = 'experiments_for_different_alpha_beta_J_results_c70.txt';
full_data = load(datafilename);
J_plot = reshape(full_data(:,3),8,8);
figure
bar3(J_plot,0.25,'detached')
%s设置坐标轴

xlabel('\it \alpha','FontName','Times New Roman');
ylabel('\it \beta','FontName','Times New Roman');
zlabel('\it J','FontName','Times New Roman');
set (gcf, 'color','w')
%set (gcf,'Position',[400,100,299,299], 'color','w')
set(gca,'FontName','Times New Roman');
set(gca,'YTickLabel',{'1';'3';'5';'7';'9';'11';'13';'15'})
set(gca,'XTickLabel',{'begin';'3';'5';'7';'9';'11';'13';'15'})




%title('Width = 0.25')

 其中用到的柱状改色,链接参考上一篇博文

猜你喜欢

转载自www.cnblogs.com/jtailong/p/12393991.html
今日推荐