#Hôm nay trời nhiều mây cực # Đầu tiên là input data

library(readxl)
## Warning: package 'readxl' was built under R version 4.0.3
ArtemiaLabData <- read_excel("C:/Users/Admin/Desktop/My Project/R/Anh Khanh/Reports/ArtemiaLabData.xlsx")
View(ArtemiaLabData)
attach(ArtemiaLabData)

Sau đó yêu cầu cái gói

require(ggplot2)
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.0.3

Cuối cùng # Tiếp theo chạy thôi

h=ggplot(ArtemiaLabData,aes(x=Celcius,y=`Hatch%`))
h+geom_point()+xlim(28,33)+ylim(44,55)+theme_bw()+theme_classic()+geom_smooth(method="lm",formula = y~x+I(x^2),se=F)+scale_x_continuous(breaks=c(28,29,30,31,32,33),limits=c(28,33))+scale_y_continuous(breaks=c(44,46,48,50,52,54),limits=c(44,55))+xlab("Temperature oC")+ylab("Artemia Hatched (%)")+ggtitle("Haching rate of artemia in different temperature")+theme(plot.title = element_text(hjust = 0.5))
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Warning: Removed 8 rows containing non-finite values (stat_smooth).
## Warning: Removed 8 rows containing missing values (geom_point).