使用映射工具箱时从 MATLAB 图删除白色背景框
我已经开始在我的一个项目中使用 MATLAB 中的映射工具箱,下面是我当前使用它创建的内容的屏幕截图。
我现在要做的是从实际地图后面删除白框,但我可以似乎不知道该怎么做。我在第一次创建地图时尝试使用axesm命令将“Frame”设置为“off”,但这并没有做到。我查看了文档,试图找出为什么会有白色背景(当我使用 worldmap 命令时,该框不会出现),但我无法确定原因。
编辑:我希望完全删除白色背景,以便使主轮廓图被图形的背景颜色包围,在本例中为灰色。
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.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
图形的背景颜色是该图形的一个名为“颜色”的属性。
如果您将该属性设置为值“none”,那么您将没有背景。
因此,最简单的方法是:
当然,您可以提供图形句柄而不是当前轴(gca)。
更激进的选择是关闭整个轴:
但这将完全删除轴,包括标签等,这可能不是您想要的。
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:
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:
But this will remove the axis completely, including labels and such which might not be what you want.
当焦点处于焦点时尝试 axis off,不在焦点时尝试 axis(handle,'off')
Try axis off when it's in focus, axis(handle,'off') when not
我有一个潜在的解决方案。
如果您运行
查找图形属性并运行
或,
您可能可以通过这种方式“填充”空间,除非有更容易更改的属性。如果这不能解决问题,您能否提供更多详细信息?
希望这有帮助!
I have a potential solution.
If you run
to find the figure attributes and run
or
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!