zzawadz / customLayout
Showing 1 of 2 files from the diff.
Other files ignored by Codecov

@@ -208,20 +208,20 @@
Loading
208 208
#' @param olay an OfficerLayout object created using \code{\link{phl_layout}}
209 209
#' @param id an single integer with an id of the placeholder from \code{olay} object.
210 210
#' @param plotFnc a function which creates a plot when called.
211 +
#' @param res The nominal resolution in ppi which will be recorded in the bitmap file. Default 300. See \code{res} parameter in \code{\link{png}}.
211 212
#' @param ... other arguments passed to \code{\link{png}} function.
212 213
#'
213 214
#' @export
214 215
#' 
215 -
phl_with_plot <- function(x, olay, id, plotFnc, ...) {
216 +
phl_with_plot <- function(x, olay, id, plotFnc, res = 300, ...) {
216 217
  
217 218
  assert_id_inlayout(id, olay)
218 219
  file <- tempfile(fileext = ".png")
219 -
  options(bitmapType = "cairo")
220 220
  grDevices::png(filename = file,
221 221
      width = olay[[id]]["width"],
222 222
      height = olay[[id]]["height"],
223 223
      units = "in", 
224 -
      res = 300, ...)
224 +
      res = res, ...)
225 225
  plotFnc()
226 226
  grDevices::dev.off()
227 227
  on.exit(unlink(file))
Files Coverage
R 95.49%
Project Totals (7 files) 95.49%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading