Octave,barplot,linestyle none

时间:2018-04-11 13:05:12

标签: bar-chart octave linestyle

以下代码:

data = rand(4, 5);

figure
h4 = bar(data, "stacked", "linestyle", "none");
l4 = legend("Col1", "Col2", "Col3", "Col4", "Col5");
legend(l4, "location", "northeastoutside");

生成一个在矩形周围没有线条的图,如下面的屏幕截图所示: enter image description here

但是,保存后,无论是通过菜单还是以编程方式,边框都会显示: enter image description here

保存为PNG,EPS或PDF时会发生这种情况。我是否缺少一些选项来生成没有边框的框?

提前致谢,

罗德里戈

1 个答案:

答案 0 :(得分:0)

clear all; close all; clc;
data = rand(4, 5);
figure
h4 = bar(data, "stacked", "linestyle", "none");
l4 = legend("Col1", "Col2", "Col3", "Col4", "Col5");
h=legend(l4, "location", "northeastoutside");
axis off;