使用'expression'将数学类型合并到R Plot中[重复]

时间:2022-01-12 23:25:50

This question already has an answer here:

这个问题在这里已有答案:

I want to incorporate a greater than or equal to sign into my plot produced using the software package R. However, it doesn't end up justifying correctly. For example:

我想在我使用软件包R生成的绘图中加入大于或等于符号。但是,它最终无法正确证明。例如:

plot(1:10,1:10,col=-1)
text(5,5,expression(paste('Data used\n',phantom(x)>=5,' units')),pos=3)

I would like everything to be centered and still split onto two lines. 使用'expression'将数学类型合并到R Plot中[重复]

我希望一切都集中在一起,仍然分成两行。

1 个解决方案

#1


1  

Remove \n after the Data used. Should do the trick

使用数据后删除\ n。应该做的伎俩

#1


1  

Remove \n after the Data used. Should do the trick

使用数据后删除\ n。应该做的伎俩