project-gen3sis / R-package

Repository of the R-packageGen3sis
https://project-gen3sis.github.io/R-package/
GNU General Public License v3.0
29 stars 9 forks source link

axis label for time series in summary plot is wrong #40

Closed benj919 closed 3 years ago

benj919 commented 4 years ago

the indexing for the timestep labels on the x-axis is wrong.

line 132-134

  axis_lab <- seq(from=1, to=nrow(d), length.out = max((nrow(d)/20),2))
  axis(1, at=rev(as.numeric(rownames(d)))[axis_lab], labels = rownames(d)[axis_lab])
  mtext(side=1, text="Time steps", line=2.5, cex=1.1)

the "at" uses the row number 0 as starting index. indexing is positional and starts at 1. hence all axis labels are shifted by one to the left