Closed novotny1akub closed 2 years ago
Howdy!
Thanks for the FR. I'll think about this one.
Just as a note, a similar output is currently possible via the gt_plt_bar()
function as seen in the below reprex:
library(tidyverse)
library(gt)
library(gtExtras)
set.seed(37)
input_df <- map(
set_names(letters[1:2]),
~runif(10, -1, 1)
) %>%
as_tibble()
input_df %>%
gt() %>%
gt_duplicate_column(a) %>%
gt_plt_bar(column = a, color = ifelse(gt_index(., a) >= 0, "blue", "red"),
accuracy = 0.1, scale_type = "number") %>%
gtsave("ex.png")
Created on 2021-10-11 by the reprex package (v2.0.1)
Wow, this is great. I was not aware.
This is a really good package. Have you considered adding a possibility to have a "conditional barplot"? Something along these lines: