如何在 R 闪亮的 plotly plot 框内添加文本?

How to add text inside the box with plotly plot in R shiny?

请看带圆圈文字的图片。我使用 renderUI 来显示我的情节,但使用它我无法添加像这张图片这样的文本。有人可以帮帮我吗? enter image description here

在您的布局代码中添加这一行:

layout( 
annotations = list(text = "Your text here :)",  x = 100, y = 25, showarrow=F),
...)