Add optional width and height arguments save plots
Sometimes the graphs must have a special size. This adds optional arguments for width and height.
This commit is contained in:
parent
792b42373e
commit
4762523c20
4
utils.R
4
utils.R
@ -11,9 +11,9 @@
|
||||
# or NULL if not needed.
|
||||
# Default filesize is 3000x3000 px and 300 dpi resolution.
|
||||
#
|
||||
sma_plot_file <- function(fname, ftype, fun) {
|
||||
sma_plot_file <- function(fname, ftype, fun, width = 3000, height = 3000) {
|
||||
# Open file for writing
|
||||
ftype(filename = fname, width = 3000, height = 3000, res = 300)
|
||||
ftype(filename = fname, width = width, height = height, res = 300)
|
||||
|
||||
#
|
||||
# Write plot into variable, then printing it manually. This is
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user