R-Lum / RLumModel

Compare bbe7e21 ... +13 ... 1915e8e

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -16,8 +16,8 @@
Loading
16 16
#'@param plot [logical] (*with default*): enables/disables plot output
17 17
#'
18 18
#'@param ... optional arguments to be passed to control the plot output. Supported
19 -
#'are `xlab`, `ylab`, `col`, `type`, `bg`, `main`. Where meaningful, parameters can be provided
20 -
#'as vectors. Vectors short than the number of plots are recycled.
19 +
#'are `xlab`, `ylab`, `col`, `type`, `bg`, `main`, `grid` (`TRUE`/`FALSE`).
20 +
#'Where meaningful, parameters can be provided as vectors. Vectors short than the number of plots are recycled.
21 21
#'
22 22
#'@return Returns a plot and [list] with [matrix] objects of the parameter evolution. If
23 23
#'`object` is a [list] the output is a nested [list]
@@ -118,8 +118,8 @@
Loading
118 118
    if (n > 1) {
119 119
      op <- par(
120 120
        mfrow = c(n, 1),
121 -
        mar = c(0, 5, 0, 5),
122 -
        omi = c(0.5, 0, 0.5, 0)
121 +
        mar = c(0, 5, .25, 5),
122 +
        omi = c(0.5, 0, 0.5, 0.1)
123 123
      )
124 124
      on.exit(par(op))
125 125
    }
@@ -131,8 +131,8 @@
Loading
131 131
      ylab = regmatches(param_names, regexec("[^conc\\.].+", param_names)),
132 132
      col = khroma::colour("muted")(),
133 133
      bg = TRUE,
134 -
      type = "l"
135 -
134 +
      type = "l",
135 +
      grid = FALSE
136 136
    ), list(...))
137 137
138 138
    ## expand parameters, this saves us a lot of trouble later on
@@ -144,20 +144,26 @@
Loading
144 144
      if (i %% 2 != 0) {
145 145
        plot(NA, NA,
146 146
          xaxt = "n",
147 +
          yaxt = "n",
148 +
          ylab = "",
147 149
          xlab = if (n > 1) "" else plot_settings$xlab[1],
148 150
          xlim = c(1,ncol(m_list[[i]])),
149 151
          ylim = range(m_list[[i]]),
150 -
          ylab = plot_settings$ylab[i],
151 152
          frame = FALSE)
152 153
154 +
        at <- axis(2, labels = FALSE, tick = FALSE)
155 +
        axis(side = 2, las = 2, at = at,
156 +
             labels = format(at, digits = 1, nsmall = 1, scientific = TRUE))
157 +
        mtext(side = 2, text = plot_settings$ylab[i], line = 3.8, cex = 0.7)
158 +
153 159
        ## add background
154 160
        if (plot_settings$bg[1]) {
155 161
          rect(
156 162
            par("usr")[1],
157 163
            par("usr")[3],
158 164
            par("usr")[2],
159 165
            par("usr")[4],
160 -
            col = rgb(0, 0, 0, 0.1),
166 +
            col = rgb(0.95, 0.95, 0.95, 1),
161 167
            border = FALSE
162 168
          )
163 169
        }
@@ -183,10 +189,13 @@
Loading
183 189
          frame = FALSE,
184 190
          ylab = "",
185 191
          col = plot_settings$col[i])
186 -
        axis(side = 4)
187 -
        mtext(side = 4, text = plot_settings$ylab[i], line = 3, cex = 0.7)
192 +
        at <- axis(4, labels = FALSE, tick = FALSE)
193 +
        axis(side = 4, las = 2, at = at,
194 +
             labels = format(at, digits = 1, nsmall = 1, scientific = TRUE))
195 +
        mtext(side = 4, text = plot_settings$ylab[i], line = 4, cex = 0.7)
188 196
      }
189 197
198 +
      if(plot_settings$grid[1]) graphics::grid()
190 199
    }
191 200
192 201
    ## add x-axis
@@ -197,7 +206,6 @@
Loading
197 206
  }
198 207
199 208
# Return ------------------------------------------------------------------
200 -
 return(m_list)
209 +
 if(plot) invisible(m_list) else return(m_list)
201 210
202 211
}
203 -

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R 0.05% 92.71%
src 100.00%
Project Totals (21 files) 93.06%
Loading