Closed davidhodge931 closed 3 months ago
Logic is because you often need to round or add commas to numbers, and it's easier to do this using mapping = aes(label = round(label, 0))
etc - rather than mutate(label = round(label, 0))
and label = label
bind_rows(
mtcars |> slice_min(order_by = mpg),
mtcars |> slice_max(order_by = mpg)) |>
tibble::rownames_to_column("model") |>
gg_text(
x = model,
y = mpg,
col = mpg,
label = model,
y_expand_limits = 0,
y_label = "Miles per gallon",
col_palette = c(orange, "white", teal),
)
Leave as is
Potentially remove gg_text and gg_label too