Skip to content

Commit a5612e7

Browse files
committed
Set plot size from params
1 parent 79bf475 commit a5612e7

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

workflow/rules/report.smk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ rule demix_plot:
1717
design = config["PLOTS"]
1818
input:
1919
data = REPORT_DIR_TABLES/"demix.csv"
20+
params:
21+
plot_width_mm = 159.2,
22+
plot_height_mm = 119.4,
2023
output:
2124
plot = report(REPORT_DIR_PLOTS/"demix.png")
2225
log:

workflow/scripts/report/demix_plot.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ log_info("Saving plot")
4646
ggsave(
4747
filename = snakemake@output[["plot"]],
4848
plot = p,
49-
width = 159.2,
50-
height = 119.4,
49+
width = snakemake@params$plot_width_mm,
50+
height = snakemake@params$plot_height_mm,
5151
units = "mm",
5252
dpi = 250
5353
)

0 commit comments

Comments
 (0)