Reputation: 4537
I'm trying to print a figure with the mapping toolbox. When I print my figure, it always shows a black axes box, although it is not visible in the Matlab figure itself.
This code reproduces the problem:
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')
This is my test.png file with the black axes box:
This is a screenshot from my Matlab figure:
EDIT: adding a box off
removed the top and right line
EDIT2: adding a ax.Visible = false;
worked
Upvotes: 0
Views: 68