DOI-USGS / EGRET

An R-package for the analysis of long-term changes in water quality and streamflow, including the water-quality method Weighted Regressions on Time, Discharge, and Season (WRTDS). https://doi-usgs.github.io/EGRET/

Home Page:http://doi-usgs.github.io/EGRET/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plotConcHist (and related functions) and placement of annual values

rmhirsch49 opened this issue · comments

I was running a simple WRTDS trend, using water years. The last water year in the record is 2005. The final dot in the plot show up right on the right hand margin of the plot, at 2005. When I looked at the code for plotConcHist I see that there is this code:

if (waterYear) {
localAnnualResults$DecYear <- floor(localAnnualResults$DecYear)

I know that localAnnualResults$DecYear is 2005.247 so that is getting changed to 2005 and thus plotting on the right edge of the plot. It seems to me in the past that values associated with any period of analysis were always plotting at the mean value of DecYear for that PA. So, I think this statement should be deleted. I can't see any harm it will do to other parts of the plot.

Same fix would be needed in plotFluxHist, and the plotConcHistBoot and plotFluxHistBoot.

Do you agree?