在此图Bar chart with description中,我想隐藏附加图像中出现在正方形中的文字。
p <- plot_ly(
x = ~df1$x1,
y = ~df1$y1,
name = "Most frequent words",
type = "bar",
mode="markers" ,
color = ~df1$x1 ,
colors=c("red","blue") , showlegend = FALSE,
) %>%
layout(
title = "Most frequent words for #Dante2018",
yaxis = list(title = 'Frequency'),
xaxis = list(title = 'Word', tickangle = -45))
答案 0 :(得分:0)
尝试像这样添加hoverinfo = 'x+y'
-
p <- plot_ly(
x = ~df1$x1,
y = ~df1$y1,
name = "Most frequent words",
type = "bar",
mode="markers" ,
color = ~df1$x1 ,
colors=c("red","blue") , showlegend = FALSE,
hoverinfo = 'x+y'
) %>%
layout(
title = "Most frequent words for #Dante2018",
yaxis = list(title = 'Frequency'),
xaxis = list(title = 'Word', tickangle = -45))