How do you fix the size of an axes graphic object?
我正在MATLAB中创建一个简单的GUI,并且正在尝试创建一个在轴上包含2d图的图形,一切运行良好,但是我很难找到解决方法。轴/图的位置。
轴似乎与图形窗口的大小成比例。如果使屏幕上的图形最大化,则轴在其中最大化,依此类推。我要完成的工作是在与图形相同的图形上的图形下方有一行按钮,基本上是50(ish)像素高的区域该情节不会侵占。我知道如何在HTML中执行此操作,但是我无法在MATLAB中找出一种好方法。
任何其他替代方法也将不胜感激。
将轴的
When you create a graph, MATLAB? creates an axes to display the graph. The axes is sized to fit in the figure and automatically resizes as you resize the figure. MATLAB applies the automatic resize behavior only when the axes Units property is set to normalized (the default).
使用
请参见此答案以获取示例以及在固定好轴尺寸后即可保持轴尺寸的功能。