Matlab图形的输出位置 [英] Output positions of Matlab figures

查看:106
本文介绍了Matlab图形的输出位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在另一个固定的窗口中显示Matlab程序的图形输出.因此,每当我运行该程序时,输出都应该在该图中.我遵循了Matlab网站上的教程,并创建了如下图:

I want to show my graphical output of a Matlab program in a different pre-fixed window. So, that whenever I run the program, the output should be inside this figure. I followed a tutorial on the Matlab website and the created the figure as follows:

直到这里一切都很好.

现在,当我用figure(1)Imshow(A)在该图形中显示一些输出时,图形大小和位置会自动更改,这是我不希望的.我得到这样的东西:

Now, when I what to show some output inside this figure with figure(1), Imshow(A), the figure size and position is automatically changed, which I do not want. I get something like this:

现在我的问题是:如何以预先计算的位置和大小显示输出?

Now my question is: How do I show the outputs in the pre-calculated position and size?

推荐答案

尝试在'InitialMagnification'设置为'fit'的情况下显示图像:

Try displaying your images with 'InitialMagnification' set to 'fit':

>> figure(1); imshow( A, 'InitialMagnification', 'fit' );

如果这不起作用,则可以在显示图像后尝试设置图形的'Position'.
另外,您可能要考虑将imagescaxis image一起使用以显示图像.

If this does not work, you might try set 'Position' of figure after showing the image.
Alternatively, you might want to consider using imagesc with axis image to display the images.

这篇关于Matlab图形的输出位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆