Commit c0034e94 authored by de Freitas Costa, Eduardo's avatar de Freitas Costa, Eduardo
Browse files

Font size for ggplots

parent 3e3548ac
......@@ -67,7 +67,8 @@ output:
rm(list = ls())
#Packages to be used
packages<-c("readxl","here","tidyverse","ggplot2","lme4","car","knitr","glmmsr","plotly","gridExtra","grid","ggridges","ggthemes","glmmTMB","bbmle","multcomp","multcompView","lsmeans","lattice","psych","reshape2","ggstance","dplyr")
packages<-c("readxl","here","tidyverse","ggplot2","lme4","car","knitr","glmmsr","plotly","gridExtra","grid","ggridges","ggthemes","glmmTMB","bbmle","multcomp","multcompView","lsmeans","lattice","psych","reshape2","ggstance","dplyr","extrafont")
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
......@@ -88,6 +89,13 @@ dir.create(here("Outputs"))
knitr::opts_chunk$set(message = FALSE) # code default outputs
knitr::opts_chunk$set(warning = FALSE) # code warnings
knitr::opts_chunk$set(echo = TRUE) # code chunks show
#loading extra fonts
loadfonts(device = "win")
#initializinz fonts
windowsFonts()
```
......@@ -226,7 +234,7 @@ ggplot(freq_1, aes(factor(VF),fr,fill=as.factor(time))) +
ggtitle(expression(paste("Percentage of ESC-R ",italic("E. coli"), "at veal farms over time")))+
labs(y = expression(paste("Percentage of ESC-R ",italic("E. coli")," (%)"), x = "Veal farms"))+
scale_y_continuous(labels = scales::percent_format(accuracy = 1))+
scale_x_discrete(labels = c("VF1","VF2","VF3","VF4","VF5","VF6","VF7","VF8"))+
scale_x_discrete(labels = c("VF1","VF2","VF3","VF4","VF5","VF6","VF7","VF8"),element_text(size=10))+
theme(axis.title.x = element_blank())
dev.off()
......
......@@ -108,7 +108,7 @@ ggplot(veal,aes(x =factor(DF),fill=factor(output))) +
theme(legend.text = element_text(size = 10),
legend.margin = margin(6, 2, 6, 2),legend.position = "bottom")+
geom_bar(position="fill")+
theme(plot.title = element_text(hjust = 0.5,size=15))+
theme(plot.title = element_text(hjust = 0.5,size=12))+
ggtitle(expression(paste("Percentage of ESC-R ",italic("E. coli"), "at dairy farms")))+
labs(y = expression(paste("Percentage of ESC-R ",italic("E. coli")," (%)"), x = "Dairy farms"))+
theme(axis.title.x = element_blank())+
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment