我对 matlab 条形图有疑问。 这是我的脚本:
Y = [0.0608 0.0018
0.383 0.0146
0.2162 0.0106
0.1212 0.0067
0.2226 0.0771
0.1507 0.008 ];
bar(Y,'stack')
grid on
set(gca,'XTickLabel',{'200% method','Alt gen method', 'Energy method','PASS 2050','Power bonus method','Exergy method'});
colormap summer
是否可以在 x 轴上设置两行名称? 例如,在第一行中使用“200%”,在第二行中使用“方法”,而不是在一行中使用(200% 方法),依此类推。
当我增加正面尺寸时,我的名字会相互重叠。
最佳答案
尝试
'1st line \n2nd line'
...
关于matlab - 2 行 x 轴名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20018116/