ipeadata-lab / ipeaplot

ipeaplot: criando graficos no padrão editorial do Ipea
https://ipeadata-lab.github.io/ipeaplot/
Other
1 stars 0 forks source link

Parametro 'name' não está funcionando em scale_fill_ipea(name = "text") #27

Closed rafapereirabr closed 10 months ago

rafapereirabr commented 10 months ago

Parametro "name" não está funcionando em scale_fill_ipea(name = "text"). Curiosamente, ele fuciona dentro scale_color_ipea():

Exemplo reproduzível abaixo:

library(ggplot2)
library(ipeaplot)

data("mtcars")

df <- mtcars |> 
  group_by(carb) |>
  summarise(avg_hp = mean(hp))

ggplot() +
  geom_col(data = df, aes(x = carb , y = avg_hp, fill = carb)) +
  scale_fill_ipea(name = 'N. de\nCarb.') +
  theme_ipea()

ggplot() +
  geom_col(data = df, aes(x = carb , y = avg_hp, fill = carb)) +
  scale_fill_viridis_c(name = 'N. de\nCarb.') +
  theme_ipea()
PedroJorge7 commented 10 months ago

Corrigido image