【发布时间】:2019-08-05 18:00:21
【问题描述】:
我正在使用 R 与 Plotly 合作,但在将标题置于饼图上时遇到问题。标题看起来有点偏右。有没有办法做到这一点并将其向左或靠近饼图的中间移动?
这是代码:
label_names = c('Feeds','All Others')
numbers = c(first_reported, not_first_reported)
pie_colors <- c('rgba(173,216,230,1)', 'rgba(0,0,139,1)')
plot_ly(labels=label_names, values=numbers, type='pie',
insidetextfont = list(color = '#FFFFFF'),
marker = list(colors=pie_colors)) %>%
layout(title = 'Portion of Feeds')
图表的样子:
【问题讨论】: