So I have been trying to get semi-sheer ribbons onto a time-series plot. I have done the same for bar-plots using ggplot which was pretty effective BUT due to the size of the data I am working with for the time-series I can't type it out into a dataframe (working from a microsoft excel comma separated values file loaded into R). So looking to either be able to convert this to a dataframe OR plot semi-sheer blocks onto it.
Code and associated error messages below.
plot(Nitrate_Interp~RiverWensum$Rdates, type="l", xlab="Time", ylab="Nitrate (mg N L)", las=1,
col="black")
rect((RiverWensum$Rdates)-1,lower_yNr,(RiverWensum$Rdates)+1,upper_yNr, density=30, col="#FF000080",
border="red")
#defining the colour
mycol <- rgb(225,0,0,max=225,alpha=125,names="red.5")
mycol
red.5 = "#FF000080"
#error given when script run:
Error in rgb(255, 0, 0, max = 220, alpha = 125, names = "red50") :
colour intensity 1.15909, not in [0,1]
Thanks inn advance