Matlab-缩放时固定文本大小 [英] Matlab - fixed text size when zooming

查看:94
本文介绍了Matlab-缩放时固定文本大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在放大绘图时保持文本大小固定.因此,我希望指定文本区域的四个角的位置.换句话说,要解释它:缩小绘图时,文本几乎不可见,因为它太小了.这可能吗?应该的,但是我没有看到任何解决方案.

I wish to keep the text size fixed when zooming in a plot. Thus I wish to specify the position of the 4 corners of the text-area. To explain it in other words: When the plot is zoomed out the text should hardly be visible because it is so small. Is this possible? It should be but I have not seen any solution.

目前,我正在绘制一个圆圈

As for now I am plotting a circle

rectangle('Position',[xpos, ypos, 0.06, 0.2], 'Curvature',[1,1]);
% I wish to plot textstrings of num2str(val) inside the circle here
% Another alternative, to be able to se num2str(val) whenever I click the circle

预先感谢

/fixitinthemix

/fixitinthemix

推荐答案

您可以在文本手柄上设置FontUnits属性,以使文本随轴缩放.有关各种可能性,请参见此处.

You can set the FontUnits property on the text handle to make the text scale with the axes. See here for the different possibilities.

这篇关于Matlab-缩放时固定文本大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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