@@ -54,7 +54,7 @@ ggsave <- function(filename, plot = last_plot(),
54
54
filename <- file.path(path , filename )
55
55
}
56
56
old_dev <- dev.cur()
57
- dev(file = filename , width = dim [1 ], height = dim [2 ], ... )
57
+ dev(filename = filename , width = dim [1 ], height = dim [2 ], ... )
58
58
on.exit(utils :: capture.output({
59
59
grDevices :: dev.off()
60
60
dev.set(old_dev )
@@ -120,16 +120,16 @@ plot_dev <- function(device, filename, dpi = 300) {
120
120
if (is.function(device ))
121
121
return (device )
122
122
123
- eps <- function (... ) {
124
- grDevices :: postscript(... , onefile = FALSE , horizontal = FALSE ,
123
+ eps <- function (filename , ... ) {
124
+ grDevices :: postscript(file = filename , ... , onefile = FALSE , horizontal = FALSE ,
125
125
paper = " special" )
126
126
}
127
127
devices <- list (
128
128
eps = eps ,
129
129
ps = eps ,
130
- tex = function (... ) grDevices :: pictex(... ),
131
- pdf = function (... , version = " 1.4" ) grDevices :: pdf(... , version = version ),
132
- svg = function (... ) svglite :: svglite(... ),
130
+ tex = function (filename , ... ) grDevices :: pictex(file = filename , ... ),
131
+ pdf = function (filename , ... , version = " 1.4" ) grDevices :: pdf(file = filename , ... , version = version ),
132
+ svg = function (filename , ... ) svglite :: svglite(file = filename , ... ),
133
133
emf = function (... ) grDevices :: win.metafile(... ),
134
134
wmf = function (... ) grDevices :: win.metafile(... ),
135
135
png = function (... ) grDevices :: png(... , res = dpi , units = " in" ),
0 commit comments