r - 如何正确地使用“符号”R
问题描述
在我希望情节上的标记成为星星的地方使用此代码。
HTMLPlot <- plot_mapbox(dt[dt$KmeansCluster %in% ClusterList[[5]],],
x = ~Longitude, y = ~Latitude,size=2) %>%
add_markers(x = ~ Longitude,
y = ~ Latitude,
color = ~ KmeansCluster,
symbol = "star",
colors = colourvec2,
text = ~ paste(KmeansCluster, StopRef),
hoverinfo = "text") %>%
layout(mapbox = list(zoom = 12, center = list(lat = ~median(Latitude, na.rm = TRUE), lon =
~median(Longitude, na.rm = TRUE)), style = styles[1]),
updatemenus = list(list(y = 0.8, buttons = style_buttons)),
#title = list(text = paste0(opco, " profit by locality"), font = list(family = "Kristen ITC", color = "gold", size = 60)),
margin = list(l = 50, r = 50, b = 50, t = 100))
使用此代码
add_markers(x = ~ Longitude,
y = ~ Latitude,
color = ~ KmeansCluster,
symbol = ~ Flag1, symbols = list("circle","star"),
colors = colourvec2,
text = ~ paste(KmeansCluster, StopRef),
hoverinfo = "text")
解决方案
推荐阅读
- c++ - C ++ stoi:2个重载都不能转换所有参数类型
- java - 如何使用 Stream API 返回 null?
- node.js - Mongoose - 无法根据需要设置子文档(嵌套对象)
- firebase - VUEJS + Firestore 如何输出数据?
- python - 从索引中一一打印多个输出
- python - 将字典转换为表以在 Orangewidget 中输出
- javascript - 使用 gapi 将文件上传到 Google Drive
- python - 无法腌制大型 Pandas 数据框
- amqp - 具有多个客户端的 AMQ 地址到多播队列
- processwire - 在 processwire 中更改页面的 url 链接