I'm new to coding, and this is my first time asking a question here so forgive me if this doesn't follow the correct format for questions.
I'm trying to change pie chart colors in plotly with R from the default to RColorBrewer, or, alternatively any custom colors. I've tried all the suggestions I've found on here so far, but none have been successful.
My current code is below which defaults to a blue / orange color combination:
labels = c('Australia','Elsewhere')
values = c(199656, 82883)
fig <- plot_ly(type='pie', labels=labels, values=values,
textinfo='label+percent',
insidetextorientation='radial')
theme(plot.title = element_text(hjust = 0.0))
fig <- fig %>% layout(title = "Logan Population by Birthplace 2016")
fig
