text()R函数 - 如何改变一个单词的字体? [英] text() R-function - how to change the font of a single word?

查看:178
本文介绍了text()R函数 - 如何改变一个单词的字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  text(x,y,font = 2,text)

更改整个文本的字体。



但是有可能改变'text'中单个单词的字体吗?

解决方案

是的!

  plot.new()
text(0.5,0.5,expression粘贴(粗体(粗体),不粗体)))

code>?plotmath ,可以使用其他一些选项和符号。

text(x, y, font=2, "text")

changes the font of the whole 'text'.

But is it possible to change the font of a single word in 'text'?

解决方案

Yep!

plot.new()
text(0.5,0.5, expression(paste(bold("bold")," not bold")))

Take a look at ?plotmath for a whole slew of other options and symbols that can be used.

这篇关于text()R函数 - 如何改变一个单词的字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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