Skip to content

Commit 7bafb9a

Browse files
committed
add legend subtitle
1 parent 406265d commit 7bafb9a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

source/dataset_bias_cv.Rmd

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,19 +1177,23 @@ p_improvement <- improvement_df %>%
11771177
limits = c(-0.7, 0.7),
11781178
trans = scales::pseudo_log_trans(sigma = 0.01),
11791179
breaks = c(-0.6, -0.1, 0, 0.1, 0.6),
1180-
name = "Improvement"
1180+
name = paste0(
1181+
"Improvement<br>",
1182+
"<span style='font-size: 8pt'>",
1183+
"(transformed scale)</span>"
1184+
)
11811185
) +
11821186
scale_x_discrete(label = function(x) stringr::str_trunc(x, 20)) +
11831187
scale_y_discrete(label = function(x) stringr::str_trunc(x, 40)) +
11841188
facet_wrap(~rarity, scales = "free_x") +
11851189
labs(
11861190
x = "",
1187-
y = "Dataset omitted",
1188-
fill = "Improvement"
1191+
y = "Dataset omitted"
11891192
) +
11901193
theme_bw(base_size = 12) +
11911194
theme(axis.text.x = element_blank(),
1192-
legend.position = c(0.83, 0.28))
1195+
legend.position = c(0.83, 0.28),
1196+
legend.title = ggtext::element_markdown())
11931197
p_improvement
11941198
```
11951199

0 commit comments

Comments
 (0)