aaronpeikert / repro

Easy Setup of a Reproducible Workflow
GNU General Public License v3.0
36 stars 7 forks source link

Fake labels needed. #75

Open brandmaier opened 3 years ago

brandmaier commented 3 years ago

Whenever you preregister a manuscript based on fake data, it is important to clearly label this as fake. I suggest something like this. How to best determine the right font size for this? Also, the statistical results should also get a fake-label. How to do this?

library(ggplot2)

gg_fake_label <- function() {
  grob <- grid::grobTree(grid::textGrob("Fake data", x=0.5,  y=0.5, hjust=0.5,
                            gp=grid::gpar(col="grey", fontsize=53, fontface="italic")))

  annotation_custom(grob)
}

N<-100
df <- data.frame(x=rnorm(N),y=rnorm(N))
ggplot(data=df,aes(x=x,y=y))+geom_point()+
 gg_fake_label()
brandmaier commented 3 years ago
Screenshot 2021-05-10 at 15 42 24