Matlab图形打印无轴框

时间:2019-10-04 12:05:24

标签: matlab matlab-figure

我正在尝试使用映射工具箱打印图形。 当我打印图形时,尽管在Matlab图形本身中不可见,但它始终显示一个黑色的轴框。

此代码重现了问题:

f = figure;
f.Position = [f.Position(1:2) 765 421];
ax = axesm('MapProjection','robinson',...
    'MapLatLimit',[-90 90],'MapLonLimit',[-180 180],....
    'Frame','on','Grid','on');
ax.XColor = 'w';
ax.YColor = 'w';
tightmap

print('test','-dpng','-r150')

这是我带有黑轴框的test.png文件: test.png file

这是我Matlab图形的屏幕截图: screenshot

编辑:添加box off会删除顶行和右行 EDIT2 :添加ax.Visible = false;可行

1 个答案:

答案 0 :(得分:0)

我知道了。

添加了ax.Visible = false;

相关问题