【问题标题】:Remove play button from Plotly R animation从 Plotly R 动画中删除播放按钮
【发布时间】:2021-09-27 05:40:24
【问题描述】:

有没有办法去除情节 R 动画中的“播放”底部?我只想让人们使用滑块滑过数据,但我不想要播放功能。

代码如下:

g <- list(
  scope = 'usa',
  projection = list(type = 'albers usa'),
  showland = TRUE,
  landcolor = toRGB("gray95"),
  subunitcolor = toRGB("gray85"),
  countrycolor = toRGB("gray85"),
  countrywidth = 0.5,
  subunitwidth = 0.5
)

fig <- plot_geo(dat, lat = ~Latitude, lon = ~Longitude, frame = ~Year) 

fig

【问题讨论】:

    标签: r animation plotly r-plotly


    【解决方案1】:

    相信你可以使用

    fig <- fig %>% animation_button(
      hide = T
    )
    

    虽然我以前从未使用过 plotly,所以我不确定。这里有很好的文档:https://plotly.com/r/cumulative-animations/

    【讨论】:

    • 是的,我试过了。 hide = TRUE 只是 animation_slider() 不是 animation_button() 的条件
    • 嗯,令人沮丧
    猜你喜欢
    • 1970-01-01
    • 2022-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多