从 R 绘图中删除编辑图表链接图表、编辑、链接

2023-09-06 14:28:01 作者:大众男神我好爱!

有没有办法在 R 版本的 Plotly 中删除/隐藏图表右下半部分显示的编辑图表"链接?

Is there a way to remove/hide the 'Edit Chart' link that appears in the bottom right half of your graph in the R version of Plotly?

推荐答案

从文档中,使用config:

绘制对象 p

p %>%
config(showLink = F)

您可以在此处查看 .js 配置选项.

You can see .js config options in action here.

注意:顶部模式栏中的在云中保存和编辑绘图"按钮仍然存在.您可以使用

Note: the "save and edit plot in cloud" button in the Mode Bar at the top still exists. You can turn off the Mode Bar with

config(displayModeBar = F)

在 GitHub 上有一个请求来编辑特定的模式栏按钮.

There is a request on GitHub to edit specific Mode Bar buttons.