24小时热门版块排行榜    

查看: 1969  |  回复: 8

匿名

用户注销 (著名写手)

本帖仅楼主可见
已阅   同方向广播   申请数学EPI   回复此楼   编辑   查看我的主页

wurongjun

专家顾问 (职业作家)

【答案】应助回帖

感谢参与,应助指数 +1
TEXT   Text annotation.
    TEXT(X,Y,'string') adds the text in the quotes to location (X,Y)
    on the current axes, where (X,Y) is in units from the current
    plot. If X and Y are vectors, TEXT writes the text at all locations
    given. If 'string' is an array the same number of rows as the
    length of X and Y, TEXT marks each point with the corresponding row
    of the 'string' array.

    TEXT(X,Y,Z,'string') adds text in 3-D coordinates.

    TEXT returns a column vector of handles to TEXT objects, one
    handle per text object. TEXT objects are children of AXES objects.

    The X,Y pair (X,Y,Z triple for 3-D) can be followed by
    parameter/value pairs to specify additional properties of the text.
    The X,Y pair (X,Y,Z triple for 3-D) can be omitted entirely, and
    all properties specified using parameter/value pairs.

    Execute GET(H), where H is a text handle, to see a list of text
    object properties and their current values. Execute SET(H) to see a
    list of text object properties and legal property values.
善恶到头终有报,人间正道是沧桑.
2楼2013-08-23 16:18:22
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

图强定位

木虫 (正式写手)

【答案】应助回帖

★ ★ ★ ★ ★
感谢参与,应助指数 +1
yxh821011: 金币+5, ★★★★★最佳答案 2013-08-29 18:30:57
text(X,Y,'string')
X,Y,是添加文字的横、纵坐标点,'string'是你要加入的文字,用单引号括起来
经年累月的学习希望能有所获得
3楼2013-08-23 17:00:22
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

匿名

用户注销 (著名写手)

本帖仅楼主可见
4楼2013-08-24 11:05:49
已阅   申请数学EPI   回复此楼   编辑   查看我的主页

匿名

用户注销 (著名写手)

本帖仅楼主可见
5楼2013-08-24 11:06:07
已阅   申请数学EPI   回复此楼   编辑   查看我的主页

图强定位

木虫 (正式写手)

引用回帖:
4楼: Originally posted by yxh821011 at 2013-08-24 11:05:49
请问X和Y一般怎么确定呢,我试了几次X和Y的值,都没有显示任何结果啊...

你可以先在命令窗口单独试一下加入文字
text(0.5,0.7,'some words')
0.5是横坐标 0.7是纵坐标 你改一下x和y的数字,回车看图形有什么改变。你就明白了。
下次自己加的时候算好需要加文字的坐标,在套用这个格式就可以了。
如果是三维的就以此类推
经年累月的学习希望能有所获得
6楼2013-08-24 13:34:35
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

匿名

用户注销 (著名写手)

本帖仅楼主可见
7楼2013-08-29 18:30:39
已阅   申请数学EPI   回复此楼   编辑   查看我的主页

呆pipi

新虫 (初入文坛)

引用回帖:
2楼: Originally posted by wurongjun at 2013-08-23 16:18:22
TEXT   Text annotation.
    TEXT(X,Y,'string') adds the text in the quotes to location (X,Y)
    on the current axes, where (X,Y) is in units from the current
    plot. If X and Y are vectors, TEX ...

你好,我想请问下这个方法如何修改文字的颜色和字体呢!因为text默认黑色
8楼2014-05-05 11:55:34
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

wurongjun

专家顾问 (职业作家)

引用回帖:
8楼: Originally posted by 呆pipi at 2014-05-05 11:55:34
你好,我想请问下这个方法如何修改文字的颜色和字体呢!因为text默认黑色...

例如:
>> plot([0 1 2 3 4],[3 4 4 1 2],'-ok')
>> hold on
>> text(1,2,'L','Color','r','fontsize',18,'fontname','Times New Roman','fontangle','italic');
所得图片如下!
matlab7如何在图中添加文字
tupian.jpg

善恶到头终有报,人间正道是沧桑.
9楼2014-05-05 12:45:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 yxh821011 的主题更新
信息提示
请填处理意见