-
Notifications
You must be signed in to change notification settings - Fork 0
/
Figures-Plotting_Parameters_only.Rmd
418 lines (302 loc) · 18 KB
/
Figures-Plotting_Parameters_only.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
---
title: "NDMPaperFigures"
author: "BrinnaeBent"
date: "September 5, 2019"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Baseline Figure (2A)
```{r}
library(ggplot2)
cdf <- read.csv('figuredata_baseline.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
cdf$WS <- factor(cdf$WS, levels=c("Apple Watch", "Fitbit", "Garmin","Miband", "Empatica", "Biovotion"))
levels(cdf$WS) <- gsub(" ", "\n", levels(cdf$WS))
cdf$Fitzpatrick <- as.factor(cdf$Fitzpatrick)
ggplot(cdf, aes(x=WS, y=Mean, fill=Fitzpatrick, colour=Fitzpatrick)) +
geom_point(size=7, alpha=0.8)+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw(base_size = 15)+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
geom_hline(yintercept = 0, color="green")+
theme(axis.title.x=element_blank())+
#theme(legend.position="right", legend.direction = "vertical")+
theme(legend.position = "none") +
guides(colour = guide_legend(ncol = 1))+
labs(y=expression(atop(bold("MDE: Rest(bpm)"), paste(bold("ECG"[HR]*"-Wearable"[HR]*"")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm"))+
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
theme(axis.text.x=element_text(size=15, family = "sans"), axis.text.y=element_text(size=15, face="bold", family = "sans"), axis.title.y=element_text(size=22, face="bold", family = "sans"), text=element_text(size=15, face="bold", family = "sans"))
#+ geom_errorbar(aes(ymin=Mean-Error, ymax=Mean+Error, x=WS), size=.8, width=0.3)
#,breaks=seq(-30,20,5)
ggsave('filename', plot=last_plot(), device='png', height = 5.7 , width = 5.3)
```
# Activity Figure (2B)
```{r}
library(ggplot2)
cdf <- read.csv('figuredata_activity.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
cdf$WS <- factor(cdf$WS, levels=c("Apple Watch", "Fitbit", "Garmin","Miband", "Empatica", "Biovotion"))
levels(cdf$WS) <- gsub(" ", "\n", levels(cdf$WS))
cdf$Fitzpatrick <- as.factor(cdf$Fitzpatrick)
ggplot(cdf, aes(x=WS, y=Mean, fill=Fitzpatrick, colour=Fitzpatrick)) +
geom_point(size=7, alpha=0.8)+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw(base_size = 15)+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
geom_hline(yintercept = 0, color="green")+
theme(axis.title.x=element_blank())+
#theme(legend.position="right", legend.direction = "vertical")+
theme(legend.position = "none") +
guides(colour = guide_legend(ncol = 1))+
labs(y=expression(atop(bold("MDE:Activity(bpm)"), paste(bold("ECG"[HR]*"-Wearable"[HR]*"")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm"))+
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
theme(axis.text.x=element_text(size=15, family = "sans"), axis.text.y=element_text(size=15, face="bold", family = "sans"), axis.title.y=element_text(size=22, face="bold", family = "sans"), text=element_text(size=15, face="bold", family = "sans"))
#+ geom_errorbar(aes(ymin=Mean-Error, ymax=Mean+Error, x=WS), size=.8, width=0.3)
#,breaks=seq(-40,30,5)
ggsave('filename', plot=last_plot(), device='png', height = 5.7 , width = 5.3)
```
# HRV Figure (3)
```{r}
library(ggplot2)
hdf <- read.csv('figuredata_hrv.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
hdf$Var <- factor(hdf$Var, levels=c("pNN50", "SDNN", "RMSSD", "Max HRV", "Min HRV","Mean HRV"))
hdf$Fitzpatrick <- as.factor(hdf$Fitzpatrick)
ggplot(hdf, aes(x=Mean, y=Var, fill=Fitzpatrick, colour=Fitzpatrick)) + geom_point(size=7)+
geom_errorbarh(aes(xmin=Mean-Error, xmax=Mean+Error, y=Var), size=.8, height=0.4)+ scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+theme_bw(base_size=15)+theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+ geom_vline(xintercept = 0, color="green")+ theme(axis.title.y=element_blank())+ theme(legend.position="bottom", legend.direction = "horizontal")+ guides(colour = guide_legend(nrow = 1))+ scale_x_continuous(name="Error from ECG HRV Metric")+theme(text=element_text(size=16, face="bold", family = "sans")) +
theme(axis.text.x=element_text(size=15, family = "sans"), axis.text.y=element_text(size=15, face="bold", family = "sans"), axis.title.x=element_text(size=18, face="bold", family = "sans"), text=element_text(size=15, face="bold", family = "sans"))
ggsave('filename', plot=last_plot(), device='png')
```
# Activity vs. Baseline (4)
```{r}
library(ggplot2)
hdf <- read.csv('figuredata_activitybaseline.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#FF4500","#008080")
hdf$Device <- factor(hdf$Device, levels=c("Apple Watch", "Fitbit", "Garmin","Miband", "Empatica", "Biovotion"))
levels(hdf$Device) <- gsub(" ", "\n", levels(hdf$Device))
g1 <- ggplot(hdf, aes(x=Device, y=Mean, fill=Activity, colour=Activity)) +
geom_point(size=7)+
geom_errorbar(aes(ymin=Mean-Error, ymax=Mean+Error, x=Device), size=.8, width=0.2)+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw()+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
geom_hline(yintercept = 0, color="green")+
theme(axis.title.x=element_blank())+
#theme(legend.position="right", legend.direction = "vertical") +
theme(legend.position = "none") +
guides(colour = guide_legend(ncol = 1))+
theme(axis.text.x=element_text(size=15, family = "sans"), axis.text.y=element_text(size=15, face="bold", family = "sans"), axis.title.y=element_text(size=22, face="bold", family = "sans"), text=element_text(size=13, face="bold", family = "sans"))+
labs(y=expression(atop(bold("MDE (bpm)"), paste(bold("ECG"[HR]*"-Wearable"[HR]*"")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm"))
##+scale_fill_discrete(name = "Condition", labels = c("Consumer", "Research"))
ggsave('filename', plot=last_plot(), device='png', height = 5 , width = 8)
```
```{r}
library(ggplot2)
hdf <- read.csv('figuredata_allconditionsabsolute.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ADD8E6","#008080", '#808000', '#FF4500')
hdf$Device <- factor(hdf$Device, levels=c("Apple Watch", "Fitbit", "Garmin","Miband", "Empatica", "Biovotion"))
levels(hdf$Device) <- gsub(" ", "\n", levels(hdf$Device))
g1 <- ggplot(hdf, aes(x=Device, y=Mean, fill=Activity, colour=Activity)) +
geom_point(size=7)+
geom_errorbar(aes(ymin=Mean-Error, ymax=Mean+Error, x=Device), size=.8, width=0.2)+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw()+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
geom_hline(yintercept = 0, color="green")+
theme(axis.title.x=element_blank())+
theme(legend.position="right", legend.direction = "vertical") +
#theme(legend.position = "none") +
guides(colour = guide_legend(ncol = 1))+
theme(axis.text.x=element_text(size=12, family = "sans"), axis.text.y=element_text(size=15, face="bold", family = "sans"), axis.title.y=element_text(size=22, face="bold", family = "sans"), text=element_text(size=13, face="bold", family = "sans"))+
labs(y=expression(atop(bold("MAE (bpm)"), paste(bold("|ECG"[HR]*"-Wearable"[HR]*"|")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm"))
##+scale_fill_discrete(name = "Condition", labels = c("Consumer", "Research"))
ggsave('filename', plot=last_plot(), device='png', height = 5 , width = 8)
```
```{r}
library(ggplot2)
hdf <- read.csv('figuredata_allconditionsrelative.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ADD8E6","#008080", '#808000', '#FF4500')
hdf$Device <- factor(hdf$Device, levels=c("Apple Watch", "Fitbit", "Garmin","Miband", "Empatica", "Biovotion"))
levels(hdf$Device) <- gsub(" ", "\n", levels(hdf$Device))
ggplot(hdf, aes(x=Device, y=Mean, fill=Activity, colour=Activity)) +
geom_point(size=7)+
geom_errorbar(aes(ymin=Mean-Error, ymax=Mean+Error, x=Device), size=.8, width=0.2)+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw()+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
geom_hline(yintercept = 0, color="green")+
theme(axis.title.x=element_blank())+
theme(legend.position="right", legend.direction = "vertical") +
#theme(legend.position = "none") +
guides(colour = guide_legend(ncol = 1))+
theme(axis.text.x=element_text(size=12, family = "sans"), axis.text.y=element_text(size=15, face="bold", family = "sans"), axis.title.y=element_text(size=22, face="bold", family = "sans"), text=element_text(size=13, face="bold", family = "sans"))+
labs(y=expression(atop(bold("MDE (bpm)"), paste(bold("ECG"[HR]*"-Wearable"[HR]*"")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm"))
##+scale_fill_discrete(name = "Condition", labels = c("Consumer", "Research"))
ggsave('filename', plot=last_plot(), device='png', height = 5 , width = 8)
```
```{r}
library(ggplot2)
hdf <- read.csv('figuredata_activitybaselineabsolute.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#FF4500","#008080")
hdf$Device <- factor(hdf$Device, levels=c("Apple Watch", "Fitbit", "Garmin","Miband", "Empatica", "Biovotion"))
levels(hdf$Device) <- gsub(" ", "\n", levels(hdf$Device))
g1 <- ggplot(hdf, aes(x=Device, y=Mean, fill=Activity, colour=Activity)) +
geom_point(size=7)+
geom_errorbar(aes(ymin=Mean-Error, ymax=Mean+Error, x=Device), size=.8, width=0.2)+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw()+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
geom_hline(yintercept = 0, color="green")+
theme(axis.title.x=element_blank())+
#theme(legend.position="right", legend.direction = "vertical") +
theme(legend.position = "none") +
guides(colour = guide_legend(ncol = 1))+
theme(axis.text.x=element_text(size=15, family = "sans"), axis.text.y=element_text(size=15, face="bold", family = "sans"), axis.title.y=element_text(size=22, face="bold", family = "sans"), text=element_text(size=13, face="bold", family = "sans"))+
labs(y=expression(atop(bold("MAE (bpm)"), paste(bold("|ECG"[HR]*"-Wearable"[HR]*"|")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm"))
#labs(y = expression("N-NO"[3]*" (??? vs air)"))
ggsave('filename', plot=last_plot(), device='png', height = 5 , width = 8)
```
# Bar graphs with all skin tones and devices
#Baseline:
```{r}
cdf <- read.csv('Barbase.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
cdf$WS <- factor(cdf$WS, levels=c("Apple Watch", "Fitbit", "Garmin","Miband", "Empatica", "Biovotion"))
levels(cdf$WS) <- gsub(" ", "\n", levels(cdf$WS))
cdf$Fitzpatrick <- as.factor(cdf$Fitzpatrick)
library(ggplot2)
ggplot(data=cdf, aes(x=WS, y=Mean, fill=Fitzpatrick)) +
geom_bar(stat="identity", position="dodge")+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw(base_size=15)+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
#theme(legend.position="right", legend.direction = "vertical")+
theme(legend.position = "none") +
theme(plot.margin=unit(c(1,1,1,1), "cm"))+
guides(colour = guide_legend(nrow = 1))+ theme(axis.title.x=element_blank())+
geom_errorbar(aes(ymin=Mean-Error, ymax=Mean+Error, x=WS), size=.3, width=0.3, position=position_dodge(.9))+
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
ylim(0,32)+
theme(axis.text.x=element_text(size=18, family = "sans"), axis.text.y=element_text(size=18, face="bold", family = "sans"), axis.title.y=element_text(size=18, face="bold", family = "sans"), text=element_text(size=13, face="bold", family = "sans"))+
labs(y=expression(atop(bold("MAE: Rest (bpm)"), paste(bold("|ECG"[HR]*"-Wearable"[HR]*"|")))))
ggsave('filename', plot=last_plot(), device='png')
```
#Activity:
```{r}
cdf <- read.csv('Baract.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
cdf$WS <- factor(cdf$WS, levels=c("Apple Watch", "Fitbit", "Garmin","Miband", "Empatica", "Biovotion"))
levels(cdf$WS) <- gsub(" ", "\n", levels(cdf$WS))
cdf$Fitzpatrick <- as.factor(cdf$Fitzpatrick)
library(ggplot2)
ggplot(data=cdf, aes(x=WS, y=Mean, fill=Fitzpatrick)) +
geom_bar(stat="identity", position="dodge")+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw(base_size=15)+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
#theme(legend.position="right", legend.direction = "vertical")+
theme(legend.position = "none") +
theme(plot.margin=unit(c(1,1,1,1), "cm"))+
guides(colour = guide_legend(nrow = 1))+ theme(axis.title.x=element_blank())+
geom_errorbar(aes(ymin=Mean-Error, ymax=Mean+Error, x=WS), size=.3, width=0.3, position=position_dodge(.9))+
ylim(0,32)+
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
theme(axis.text.x=element_text(size=18, family = "sans"), axis.text.y=element_text(size=18, face="bold", family = "sans"), axis.title.y=element_text(size=18, face="bold", family = "sans"), text=element_text(size=13, face="bold", family = "sans"))+
labs(y=expression(atop(bold("MAE: Activity (bpm)"), paste(bold("|ECG"[HR]*"-Wearable"[HR]*"|")))))
ggsave('filename', plot=last_plot(), device='png')
```
# Activity Absolute
```{r}
cff= read.csv('Baract_combined_absolute.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
cff$Fitzpatrick <- as.factor(cff$Fitzpatrick)
library(ggplot2)
ggplot(data=cff, aes(x=Fitzpatrick, y=MAE, fill=Fitzpatrick)) +
geom_bar(stat="identity", position="dodge")+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw()+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
#theme(legend.position="right", legend.direction = "vertical")+
theme(legend.position = "none") +
labs(y=expression(atop(bold("MAE: Activity (bpm)"), paste(bold("|ECG"[HR]*"-Wearable"[HR]*"|")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm")) +
guides(colour = guide_legend(nrow = 1))+
theme(axis.title.x=element_blank())+
ylim(0,25)+
geom_errorbar(aes(ymin=MAE-Error, ymax=MAE+Error, x=Fitzpatrick), size=.3, width=0.3, position=position_dodge(.9))+
theme(axis.text.x=element_text(size=14, face="bold",family = "sans"), axis.text.y=element_text(size=18, face="bold", family = "sans"), axis.title.y=element_text(size=18, face="bold", family = "sans"))
ggsave('filename', plot=last_plot(), device='png')
```
#Relative Activity
```{r}
cff= read.csv('Baract_combined_relative.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
cff$Fitzpatrick <- as.factor(cff$Fitzpatrick)
library(ggplot2)
ggplot(data=cff, aes(x=Fitzpatrick, y=MAE, fill=Fitzpatrick)) +
geom_bar(stat="identity", position="dodge")+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw()+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
#theme(legend.position="right", legend.direction = "vertical")+
theme(legend.position = "none") +
labs(y=expression(atop(bold("MDE: Activity (bpm)"), paste(bold("ECG"[HR]*"-Wearable"[HR]*"")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm")) +
guides(colour = guide_legend(nrow = 1))+
theme(axis.title.x=element_blank())+
ylim(0,25)+
geom_errorbar(aes(ymin=MAE-Error, ymax=MAE+Error, x=Fitzpatrick), size=.3, width=0.3, position=position_dodge(.9))+
theme(axis.text.x=element_text(size=14, face="bold",family = "sans"), axis.text.y=element_text(size=18, face="bold", family = "sans"), axis.title.y=element_text(size=18, face="bold", family = "sans"))
ggsave('filename', plot=last_plot(), device='png')
```
#Absolute Baseline
```{r}
cff= read.csv('Barbase_combined_absolute.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
cff$Fitzpatrick <- as.factor(cff$Fitzpatrick)
library(ggplot2)
ggplot(data=cff, aes(x=Fitzpatrick, y=MAE, fill=Fitzpatrick)) +
geom_bar(stat="identity", position="dodge")+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw()+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
#theme(legend.position="right", legend.direction = "vertical")+
theme(legend.position = "none") +
labs(y=expression(atop(bold("MAE: Rest (bpm)"), paste(bold("|ECG"[HR]*"-Wearable"[HR]*"|")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm")) +
guides(colour = guide_legend(nrow = 1))+
ylim(0,25)+
theme(axis.title.x=element_blank())+
geom_errorbar(aes(ymin=MAE-Error, ymax=MAE+Error, x=Fitzpatrick), size=.3, width=0.3, position=position_dodge(.9))+
theme(axis.text.x=element_text(size=14, face="bold", family = "sans"), axis.text.y=element_text(size=18, face="bold", family = "sans"), axis.title.y=element_text(size=18, face="bold", family = "sans"))
ggsave('filename', plot=last_plot(), device='png')
```
# Relative Baseline
```{r}
cff= read.csv('Barbase_combined_relative.csv', header=TRUE, stringsAsFactors = FALSE)
cols = c("#ffdbac","#f1c27d","#e0ac69","#c68642","#7e4d1c","#3e2b13")
cff$Fitzpatrick <- as.factor(cff$Fitzpatrick)
library(ggplot2)
ggplot(data=cff, aes(x=Fitzpatrick, y=MAE, fill=Fitzpatrick)) +
geom_bar(stat="identity", position="dodge")+
scale_colour_manual(values = cols)+ scale_fill_manual(values = cols)+
theme_bw()+
theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank())+
#theme(legend.position="right", legend.direction = "vertical")+
theme(legend.position = "none") +
labs(y=expression(atop(bold("MDE: Rest (bpm)"), paste(bold("ECG"[HR]*"-Wearable"[HR]*"")))))+
theme(plot.margin=unit(c(1,1,1,1), "cm")) +
guides(colour = guide_legend(nrow = 1))+
theme(axis.title.x=element_blank())+
geom_errorbar(aes(ymin=MAE-Error, ymax=MAE+Error, x=Fitzpatrick), size=.3, width=0.3, position=position_dodge(.9))+
theme(axis.text.x=element_text(size=14, face="bold", family = "sans"), axis.text.y=element_text(size=18, face="bold", family = "sans"), axis.title.y=element_text(size=18, face="bold", family = "sans"))
ggsave('filename', plot=last_plot(), device='png')
```