Skip to content

Commit 59f39c2

Browse files
committed
Improve positioning of SAE label
1 parent e09acc4 commit 59f39c2

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dv.papo
22
Title: Patient Profile
3-
Version: 2.0.7-9001
3+
Version: 2.0.7-9002
44
Date: 2024-08-13
55
Authors@R:
66
c(person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),

R/create_plots.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ create_ae_cm_plot <- function(data, x_limits, palette, sl_info, vline_vars, vlin
4646

4747
if ("serious_ae" %in% names(data)) {
4848
sae_labels <- ifelse(data[["serious_ae"]], "SAE", "")
49+
t_diff <- as.numeric(x_limits[2] - x_limits[1])
4950
p <- p + ggplot2::geom_text(
5051
ggplot2::aes(
5152
x = .data[["start_day_z"]],
5253
y = .data[["decode"]],
5354
label = sae_labels
5455
),
55-
colour = "red", nudge_y = 0.25, nudge_x = 1, size = 3
56+
colour = "red", nudge_y = 0.25, nudge_x = 0.01 * t_diff, size = 3
5657
)
5758
}
5859

0 commit comments

Comments
 (0)