Description Usage Arguments See Also Examples
This function adds updated heor styling done by David, not complete yet. TBD: make sure font dependencies are working correctly. At the moment, it requires to import a bunch of windows fonts through extrafonts library (will it come as a part of installation?), import takes a few minutes.
1 | heorTheme(data.name, font, fontscale, colour.name)
|
data.name |
The dataset used in the plot |
font |
The name of the font you want to be used, e.g. font="Tahoma" |
fontscale |
The size of the font to be used in the plot |
colour.name |
The name of the variable that is going to be stratified by colours |
Other themes:
heor_style_minimal()
,
heor_style()
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(line_plot)
line_plot$treatment <- as.character(line_plot$treatment)
line_plot$treatment <- factor(line_plot$treatment,levels=unique(line_plot$treatment))
ggplot() +
geom_line(data=line_plot,mapping=aes(x=time,y=hba1c,colour=treatment),linetype="solid",alpha=1.0,size=0.7) +
geom_hline(yintercept=c(8.0,9.0),colour="black",linetype="dashed",size=0.4) +
scale_x_continuous("Time (Years)",breaks=seq(0,40,5),limits=c(0,40),expand=c(0,0)) +
scale_y_continuous("HbA1c (%)",breaks=seq(6.5,10.0,0.5),limits=c(6.5,10.0),expand=c(0,0)) +
labs(title="Plot Title",
subtitle="Plot Subtitle",
caption="Example caption text",
tag="A)") +
heorTheme(line_plot,"Tahoma",1,"treatment")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.