-2
I have a chart made with ggplot2
, in the legend is appearing a size
and I’d like to remove it, but I don’t know how.
My code:
updates %>%
mutate(mortalidade = deaths / confirmed) %>%
filter(iso3c %in% paises, date == max(date) - 1) %>%
arrange(desc(mortalidade)) %>%
select(country, mortalidade, region) %>%
na.omit() %>%
ggplot() +
geom_col(aes(x = reorder(country, - mortalidade), y = mortalidade, fill = na.omit(region))) +
geom_text(aes(x = country, y = mortalidade, label = percent(round(mortalidade, 2)),
vjust = -0.15, size = 3)) +
scale_y_continuous(labels = percent_format(accuracy = 1)) +
scale_fill_economist() +
labs(x = "", y = "", fill = "") +
theme(legend.position = "bottom",
text = element_text(size = 10), axis.text.x = element_text(angle = 90, hjust = 1),
panel.background = element_rect(fill = "white", colour = "grey10"),
panel.grid.major = element_line(colour = "gray", linetype = "solid"))
I’d like to withdraw that size A3
. If you think it necessary, I’ll put the dput()
of my data.
Other users should be able to copy and run the code you posted without having to request extra data. If you are not using an R database, always include the data used.
– Carlos Eduardo Lagosta