Open Edouard-Legoupil opened 2 years ago
Thank you @Edouard-Legoupil, I'm glad you find the package useful.
I agree adding a ggtext::geom_textbox()
option for an annotation layer would be good.
I see three options for this:
ggtext::geom_textbox()
for all text annotations; geom_textbox()
option for an annotation (in the same way people can choose text / curve / etc) ggtext
installed; if so, use geom_textbox()
, if not use geom_text()
. I guess I'm leaning towards (3) but would appreciate thoughts
Hi @MattCowgill thanks for considering the suggestion! Indeed agreed (3) !!
Great tool - thanks!!
Could be a nice improvement to add the option of getting the annotation R statement as
ggtext::geom_textbox
(together with related styling options...) as this would give a lot more options to style the annotation - ideally adding also the capacity to link the geom_textbox to the area of interest in the chart with ageom_curve
arrows!Currently did that manually - see example...
geom_curve(aes(xend = 10.9, yend = 2959.9, x = 6.9, y = 28668.7), size = 2, color = "tan", arrow = arrow(length = unit(0.07, "npc"))) + ggtext::geom_textbox(data = data.frame(x = 6.9, y = 28668.7, label = "Why so many people are using **other** category? \n Is there an important missing category ?"), mapping = aes(x = x, y = y, label = label), width = unit(0.6, "npc"), family = "Lato", size = 7, fill = "cornsilk", inherit.aes = FALSE)