Skip to content

Commit 27a5d0c

Browse files
committed
Add saveActiveDevice() function to the BerlinWaterModel script
1 parent 6538be3 commit 27a5d0c

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

inst/extdata/scripts/impetus/readData_BerlinWaterModel_v2.R

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,23 @@ qsimVis::add_river_legend(
132132
LegendLocation = "right"
133133
)
134134

135-
# Write output table
136-
# writexl::write_xlsx(x = output, path = file.path(path, "Viewer_Skript", "output_table.xlsx"))
135+
# Save as png
136+
qsimVis::saveActiveDevice(
137+
filename = "WaterModelPlot",
138+
path = file.path(project_path, data_path),
139+
type = "",
140+
resolution = "medium"
141+
)
137142

143+
# save as svg (vector graphic)
144+
qsimVis::saveActiveDevice(
145+
filename = "WaterModelPlot",
146+
path = file.path(project_path, data_path),
147+
type = "vector"
148+
)
138149

150+
# Write output table
151+
# writexl::write_xlsx(x = output, path = file.path(path, "Viewer_Skript", "output_table.xlsx"))
139152

140153

141154

0 commit comments

Comments
 (0)