Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 4 组 3D 散点数据,我想在 MATLAB 子图中绘制。但是,我希望每个数据集中的比例相同,以便每个数据集中的大小可以在图之间进行粗略的视觉比较。
使这有点困难的是每个图的限制是任意的,因此不能设置为特定值。
有没有办法明确设置 MATLAB 绘图的比例?像“将每个像素设置为 4 个单位”之类的东西会很棒。
如果您只想将它们全部设置为与第一个的比例相同,只需执行以下操作:
<Plot your first plot> limx = get(gca, 'XLim'); limy = get(gca, 'YLim'); <Plot your second plot> set(gca, 'XLim', limx); set(gca, 'YLim', limy);