【发布时间】:2020-07-24 15:48:54
【问题描述】:
似乎情节仪表图表与subplot 不兼容,因为我最终得到了两个相互重叠的仪表图表。
library(plotly)
fig1 <- plot_ly(
domain = list(x = c(0, 1), y = c(0, 1)),
value = 270,
title = list(text = "Speed"),
type = "indicator",
mode = "gauge+number")
fig1 <- fig1 %>%
layout(margin = list(l=20,r=30))
fig1
fig2 <- plot_ly(
domain = list(x = c(0, 1), y = c(0, 1)),
value = 50,
title = list(text = "Speed"),
type = "indicator",
mode = "gauge+number")
fig2 <- fig2 %>%
layout(margin = list(l=20,r=30))
fig2
fig <- subplot(fig1,fig2)
fig
【问题讨论】:
标签: r plotly subplot flexdashboard gauge