Hi all,
Is there a way to remove the alpha from my label in ggplotly? I have tried 'turning off' the alpha with guides (take 1 below) and scale alpha guides (take 2), which I found here: r - Remove extra legends in ggplot2 - Stack Overflow However, this method seems to work for ggplot but not ggplotly. When ggplotly gets called, the alpha in the label gets re-attached. Thank you in advance for any insight.
# Take 1:
pounds_plot <- ggplot() +
geom_sf(data = full_pov_census_data, aes(fill = NumbImpoverished)) +
geom_point(data = link2feed_partner_data, aes(x = long, y = lat, size = Total, alpha = 1)) +
guides(alpha = "none") +
ggtitle("Pounds Distributed by SHFB to Partner Programs") +
scale_fill_distiller(palette = "Spectral", name = "Number Impoverished")
ggplotly(pounds_plot) %>%
layout(height = 800) %>%
style(hoveron = "fill") %>%
style(hoveron = "size")
# Take 2:
pounds_plot <- ggplot() +
geom_sf(data = full_pov_census_data, aes(fill = NumbImpoverished)) +
geom_point(data = link2feed_partner_data, aes(x = long, y = lat, size = Total, alpha = 1)) +
scale_alpha(guide = 'none')
ggtitle("Pounds Distributed by SHFB to Partner Programs") +
scale_fill_distiller(palette = "Spectral", name = "Number Impoverished")
ggplotly(pounds_plot) %>%
layout(height = 800) %>%
style(hoveron = "fill") %>%
style(hoveron = "size")