如何操作由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
)
答案 0 :(得分:0)
不确定要在工具栏中修改的内容是什么,但是如果要带走一些物品,可以使用config(modeBarButtonsToRemove = list("lasso2d","hoverClosestCartesian", "hoverCompareCartesian","select2d"))
,至少在ggplotly中是这样,但是我敢肯定,您可以使用它还具有plotly功能。