#======================================
#========= EDIT THESE VALUES ==========
#======================================
#time in minutes
t<-150
#volume in ml
v<-0.02
#absorption at 600nm
abs600<-0.52
#Y-axis limits
yMin<-0
yMax<-1000
#point fill color
pointFill<-"#00BBFF"
#point border color
pointBorder<-"#007099"
#point size
pointSize<-2
#point stroke width
pointStroke<-1
#======================================
# === THE CODE BELOW IS READY TO GO ===
#======================================
#load graphics library
library(ggplot2)
#create a sequence of values
abs420<-seq(0.5,1.0,by=0.01)
#activity calculation function
mu <- function(abs420,t,v,abs600) {
output <- 1000*(abs420/(t*v*abs600))
return(output)
}
#run the function for values of the sequence
activity<-mu(abs420,t,v,abs600)
#create a data frame
df<-data.frame(abs420,activity)
ggplot(df, aes(x=abs420,y=activity)) +
geom_point(shape = 21,
colour = pointBorder,
fill = pointFill,
size = pointSize, stroke = pointStroke)+
scale_y_continuous(limits=c(yMin,yMax),
breaks=seq(yMin,yMax,by=50))+
labs(x="Absorption at 420nm",
y="Activity (Miller units)",
title="B-galactosidase Activity")+
theme_minimal()+
theme(legend.position = "none")
Change the variable values to your own measured values.