I have this chart.
g <- retention_cohorts %>%
ggplot(aes(relative_week, round(percent,2), label=relative_week)) +
geom_line() +
scale_y_continuous(labels = percent) +
scale_x_continuous(breaks = seq(1,24,4),
labels = seq(1,6)
) +
geom_text(nudge_y = .02) +
labs(
title = "Purchasing Retention Analysis",
subtitle = "Customers who order at least one item each week",
y = "Customers with at least One Purchase",
x = "Relative Month"
) + theme_light()
It's a great chart and I want to make it interactive. When I use ggplotly(g)
, it recreates it almost perfectly except that it drops the subtitle. Is there a way to force it to keep the subtitle or to add new text as a subtitles after the plotly
entity has been created?