Hi everyone,
For the life of me I cant seem to figure out how to change the colors of my pie chart. The colors keep displaying the default.
Data :
tibble::tribble(
~Subsector, ~Greenhouse_gas,
"Energy", 73.2,
"Agriculture, Forestry and Land Use", 18.4,
"Industry", 5.2,
"Waste", 3.2
)
Code:
brewer_seq <- c( "BuGn", "GnBu", "BuPu", "Blues")
pie <- plot_ly(data = sector1,
labels= ~Subsector,
values= ~Greenhouse_gas,
type = 'pie', sort = FALSE,
colors=brewer_seq)%>%
layout(title = "Greenhouse gases by Industry")
Thank you in advance!!