我想在Plotly圖形中嵌入圖像,但不知何故圖像不顯示。有沒有人有任何想法,我缺少的是什麼:在Plotly中嵌入圖像
library(plotly)
p <- plot_ly(x=c(1, 2, 3), y=c(1, 2, 3), type='scatter')
p2 <-
p %>%
layout(images = list(
list(source = "https://images.plot.ly/language-icons/api-home/python-logo.png",
xref = "paper",
yref = "paper",
x= 0,
y= 1,
sizex = 0.2,
sizey = 0.2,
opacity = 0.8)
)
)
p2
代碼工作完全正常,我有Plotly 4.5.6和RStudio 1.0.136在Windows 10 –