library(ggplot2)
library(tibble)
#load the data
#age of organism
age <-c(1,2,3,4,5,6,7,8,9)
#infection rate
rate<-c(0.33,0.28,0.21,0.24,0.20,0.14,0.16,0.1,0.08)
data<-tibble("age" = age, "rate" = rate)
head(data)
ggplot(data, aes(x=age, y=rate)) +
geom_point(color="#ff0000") +
theme_minimal()+
labs(x = "Age",
y = "Infection Rate") +
ggtitle("Infection Rate by Age")+
theme(axis.text.x = element_text(angle = 0, hjust = 1))+
scale_x_continuous(breaks=seq(1, 9, 1))
Change the variable values to your own measured values.