开发者

Removing White Background Box from MATLAB Figure when using the Mapping Toolbox

I've started to use the Mapping Toolbox in MATLAB for a project of mine, and below is a screenshot of what I currently have created using it.

Removing White Background Box from MATLAB Figure when using the Mapping Toolbox

What I'm trying to do now is remove the white box from behind the actual map, but I can't seem to figure out how to do it. I've trying setting 开发者_开发技巧'Frame' to 'off' with the axesm command when first creating the map, but that doesn't do it. I've looked through the documentation to try to figure out why there's even a white background (and when I use the worldmap command the box doesn't appear), but I cannot determine why.

EDIT: I am looking to remove the white background entirely, so as to have the main contour plot surrounded by the figure's background color, which in this case is the gray.


The background color of a figure is a property of that figure named 'color'. If you set that property to the value 'none' then you will have no background.

So, the easiest way to do it is:

set(gca,'color','none')

Of course you can give a figure handle instead of the current axes (gca).

The more aggressive option is to set the entire axis off:

axis off

But this will remove the axis completely, including labels and such which might not be what you want.


Try axis off when it's in focus, axis(handle,'off') when not


I have a potential solution.

If you run

get(figure(1))

to find the figure attributes and run

set('some resize property',[some set of values])

or

setm('some resize property',[some set of values])

You may be able to 'fill in' the space this way, unless there is an easier property to change. Can you please give more details if this does not lead to a solution?

Hope this helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜