0

以下代码:

data = rand(4, 5);

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

生成一个在矩形周围没有线的图,如以下屏幕截图所示: 在此处输入图像描述

但是,当保存时,无论是通过菜单还是以编程方式,都会出现边框: 在此处输入图像描述

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

提前致谢,

罗德里戈

4

1 回答 1

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;
于 2018-04-14T08:09:11.187 回答