R 图中的下标 [英] Subscripts in plots in R

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

问题描述

我找不到如何在 R 中的标题或副标题中编写下标的方法.我如何用 1,2 作为下标写 v 1,2?

I can't find a way how to write subscripts in the title or the subtitle in R. How can I write v 1,2 with 1,2 as subscripts?

感谢您的帮助!

推荐答案

expression 是你的朋友:

plot(1,1, main=expression('title'^2))  #superscript
plot(1,1, main=expression('title'[2])) #subscript

这篇关于R 图中的下标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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