I have a script in the Computer Programming Language R (Open Source) that will plot a persp (Perspective Plot) which in my case is a response surface. Illustrating the export of dissolved organic carbon (Z) (kilograms per day) from a river as a function of time of year (X) and level of discharge (Y). The response surface is a 24-by-24 matrix. The script also colors the facets of the response surface corresponding to a 4th variable (dissolved organic carbon) in milligrams per liter. It uses a raibow type color pallete where blue corresponds to low concentration and dark red corresponds to high concentration. I have not been able to add a Legend using the legend function in R because I do not understand the syntax of this function. This project would be for the freelancer to improve the code to add a working legend and in general make the plot look more like the one in the attacment that I am including. I would like the freelancer to annotate the code with ocmmehts (###) so that I can understand what each function is actually doing.