R Can';t在带有注释的绘图上以绘图方式实现GGU
我正在绘制一个冰场上拍摄位置的数据集。我想使用R Can';t在带有注释的绘图上以绘图方式实现GGU,r,ggplot2,r-plotly,ggplotly,R,Ggplot2,R Plotly,Ggplotly,我正在绘制一个冰场上拍摄位置的数据集。我想使用plotly让用户能够在悬停在每个点上时看到描述框。我想这可以用 溜冰场存储在溜冰场对象中 rink一个好的解决方案是直接使用plotly创建绘图: library(plotly) example_data %>% plot_ly(x = ~coords_x, y=~coords_y, text=~paste("Event team:", event_team, "<br>Event type:", event_
plotly
让用户能够在悬停在每个点上时看到描述框。我想这可以用
溜冰场存储在溜冰场
对象中
rink一个好的解决方案是直接使用plotly创建绘图:
library(plotly)
example_data %>%
plot_ly(x = ~coords_x, y=~coords_y,
text=~paste("Event team:", event_team, "<br>Event type:", event_type)) %>%
add_markers(marker=list(size=20)) %>%
layout(
xaxis = list(range = c(-100,100)),
yaxis = list(range = c(-45,45)),
images= list(
list(
source= "https://i.imgur.com/Y2kOUX5.png",
xref= "paper",
yref= "paper",
x= 0,
y= 1,
sizex= 1,
sizey= 1,
opacity= 0.8,
layer = "below")
)
)
library(plotly)
示例\u数据%>%
plot_ly(x=~coords_x,y=~coords_y,
text=~粘贴(“事件组:,事件组,”
事件类型:,事件类型))%>%
添加标记(标记=列表(大小=20))%>%
布局(
xaxis=list(范围=c(-100100)),
yaxis=list(范围=c(-45,45)),
图像=列表(
名单(
来源=”https://i.imgur.com/Y2kOUX5.png",
xref=“纸张”,
yref=“纸张”,
x=0,
y=1,
sizex=1,
sizey=1,
不透明度=0.8,
layer=“below”)
)
)
警告。从链接下载的图像
是删除白色边框后的原始图像
一个好的解决方案是直接使用plotly创建绘图:
library(plotly)
example_data %>%
plot_ly(x = ~coords_x, y=~coords_y,
text=~paste("Event team:", event_team, "<br>Event type:", event_type)) %>%
add_markers(marker=list(size=20)) %>%
layout(
xaxis = list(range = c(-100,100)),
yaxis = list(range = c(-45,45)),
images= list(
list(
source= "https://i.imgur.com/Y2kOUX5.png",
xref= "paper",
yref= "paper",
x= 0,
y= 1,
sizex= 1,
sizey= 1,
opacity= 0.8,
layer = "below")
)
)
library(plotly)
示例\u数据%>%
plot_ly(x=~coords_x,y=~coords_y,
text=~粘贴(“事件组:,事件组,”
事件类型:,事件类型))%>%
添加标记(标记=列表(大小=20))%>%
布局(
xaxis=list(范围=c(-100100)),
yaxis=list(范围=c(-45,45)),
图像=列表(
名单(
来源=”https://i.imgur.com/Y2kOUX5.png",
xref=“纸张”,
yref=“纸张”,
x=0,
y=1,
sizex=1,
sizey=1,
不透明度=0.8,
layer=“below”)
)
)
警告。从链接下载的图像
是删除白色边框后的原始图像
嘿,马可,我在SO上发布了一个后续问题:也许你可以在这里插话?非常感谢。嘿,马可,我在网上发布了一个后续问题:也许你可以在这里插话?非常感谢。
Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomCustomAnn() has yet to be implemented in plotly.`
library(plotly)
example_data %>%
plot_ly(x = ~coords_x, y=~coords_y,
text=~paste("Event team:", event_team, "<br>Event type:", event_type)) %>%
add_markers(marker=list(size=20)) %>%
layout(
xaxis = list(range = c(-100,100)),
yaxis = list(range = c(-45,45)),
images= list(
list(
source= "https://i.imgur.com/Y2kOUX5.png",
xref= "paper",
yref= "paper",
x= 0,
y= 1,
sizex= 1,
sizey= 1,
opacity= 0.8,
layer = "below")
)
)