Open jakobschumacher opened 5 years ago
Recently I created a figure to show the significant difference between groups using ggsignif.(The following figure is from the website of ggsignif, not mine.)
The way to annotate significance is very similar to those additional information in the above figure. Therefore, we can adapt a similar way to implement the feature requested. Given a data.frame containing following variables
start.date
: starting date (or position) of the annotation
end.date
: ending date (or position) of the annotation
y
: the height position of the annotation
labels
: information to be added
We can implement our own geom_annotate()
function to add an annotation layer and control the color, font etc. of the additional information.
See Figure 1 of this publication: https://www.eurosurveillance.org/content/10.2807/esm.02.05.00162-en In this epicurve can find additional information within the curve when the mass campaign started and ended.