Skip to content

Commit

Permalink
All plots are quadratic by default. Plots from Open-Systems-Pharmacol…
Browse files Browse the repository at this point in the history
…ogy#861 look less shrunk
  • Loading branch information
pchelle committed Jan 12, 2023
1 parent 6b14b64 commit 4b46ef8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion R/reportingengine-env.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ reEnv$theme$background$legendPosition <- tlf::LegendPositions$outsideTop

reEnv$defaultPlotFormat <- list(
format = "png",
width = 8,
width = 5,
height = 5,
units = "in",
dpi = 300
Expand Down Expand Up @@ -148,6 +148,13 @@ setDefaultPlotFormat <- function(format = NULL, width = NULL, height = NULL, uni
reEnv$defaultPlotFormat$height <- reEnv$defaultPlotFormat$height * unitConversionFactor[2]
}
reEnv$defaultPlotFormat$units <- units %||% reEnv$defaultPlotFormat$units
tlf::setDefaultExportParameters(
format = reEnv$defaultPlotFormat$format,
width = reEnv$defaultPlotFormat$width,
height = reEnv$defaultPlotFormat$height,
units = reEnv$defaultPlotFormat$units,
dpi = reEnv$defaultPlotFormat$dpi
)
return(invisible())
}

Expand Down
2 changes: 2 additions & 0 deletions R/workflow.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ Workflow <- R6::R6Class(
# Load default workflow theme, and sync the watermark
setDefaultTheme(theme)
self$setWatermark(watermark)
setDefaultPlotFormat()
})
return(invisible())
},

#' @description
Expand Down

0 comments on commit 4b46ef8

Please sign in to comment.