MATLAB 条形图(柱形图)编辑

总结于

matlab 柱状图 填充图案

Matlab条形图中填充图案

Matlab 条形图绘制 以及 添加误差棒 改变条形图形状


使用hatchfill.m 完成柱形图的填充编辑

figure(10);%VAF Plot 
Bar=bar(VAFBar*100);
BarH = findobj(Bar,'type','patch');
hatchfill(BarH(1),'single',45,1,'r');
hatchfill(BarH(2),'single',180,0.2,'b');
hatchfill(BarH(3),'single',135,1,'g');  
hatchfill(BarH(4),'cross',180,1,'m'); 
hatchfill(BarH(5),'cross',135,1,'c'); 
grid on;
%ch = get(Bar,'children');
set(gca,'XTickLabel',{'Uniform1','Vortex1','Uniform2','Vortex2'})
% set(ch,'FaceVertexCData',[1 0 1;0 0 0;])
%legend('Optimized A D','Optimized B D1','Optimized B D2','Optimized B D3','Optimized B D4','Optimized B D5','Location','SouthEast');
Legend=legend('Optimized A D1','Optimized A D2','Optimized B D1','Optimized B D2','Optimized B D3',0);
LegendH = findobj(Legend,'type','patch');
hatchfill(LegendH(1),'single',45,1,'r');
hatchfill(LegendH(2),'single',180,0.2,'b');
hatchfill(LegendH(3),'single',135,1,'g');  
hatchfill(LegendH(4),'cross',180,1,'m'); 
hatchfill(LegendH(5),'cross',135,1,'c'); 
xlabel('Conditions ','FontSize',26,'Fontname','times new Roman');
ylabel('R^2 ( % )','FontSize',26,'Fontname','times new Roman');
axis([0.5 4.5 95 100]);
set(gca,'Fontname','times new Roman','FontSize',26);


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值