【问题标题】:How can I manipulate the interactive toolbar box of a plotl- plot in R shiny?如何在 R Shiny 中操作绘图的交互式工具栏框?
【发布时间】:2019-05-20 20:04:30
【问题描述】:

如何操作由闪亮的plotly 包生成的绘图的工具栏(我不确定名称是否正确?!请参阅.)? 那是我在server 一侧的代码:

 plot_ly(pl.d, x = ~x, y = ~y1, type = 'bar', name = colnames(dataset())[2], marker = list(color = "#26478A"),
            height=800) %>%
      add_trace(y = ~y2, name = colnames(dataset())[3], marker = list(color = "#FF6600")) %>%
      add_trace(y = ~y3, name = colnames(dataset())[4], marker = list(color = "#7E182F")) %>%
      layout("title" = colnames(d.plot)[1],
             xaxis = list(title = "", tickangle = 65,tickfont  = list(family= "Arial",size = 14),
                          margin = m
                          ), 
             yaxis = list(title = "",ticksuffix = "%"),
             barmode = 'group'
            # autosize = F, width = 500, height = 500,,margin = m
             ) 

【问题讨论】:

标签: r shiny r-plotly


【解决方案1】:

不确定你到底想在工具栏中修改什么,但如果你想拿走一些项目,你可以使用config(modeBarButtonsToRemove = list("lasso2d","hoverClosestCartesian", "hoverCompareCartesian","select2d")) 至少对于 ggplotly 是这种情况,但我很确定你可以将它与plotly 函数也是如此。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-09-15
    • 1970-01-01
    • 2017-07-18
    • 2014-03-27
    • 1970-01-01
    • 1970-01-01
    • 2021-06-16
    相关资源
    最近更新 更多