Change legend size in plotly chart

﹥>﹥吖頭↗ 提交于 2019-12-12 12:50:02

问题


Is there a way to change the legend size in plotly for R? I have not come across this option. I have looked at the docs on legends, https://plot.ly/r/legend/, but it does not mention this.


回答1:


Use layout(legend = list(font = list(size(30)))):

plot_ly(data = mtcars, x = as.character(mtcars$cyl), 
        y = mtcars$mpg, type = "box", color = as.character(mtcars$cyl)) %>%
    layout(showlegend = TRUE, legend = list(font = list(size = 30)))


来源:https://stackoverflow.com/questions/37245004/change-legend-size-in-plotly-chart

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!