Skip to content

Add the "boxplot" type of nanoplot #1527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jan 6, 2024
Merged

Add the "boxplot" type of nanoplot #1527

merged 20 commits into from
Jan 6, 2024

Conversation

rich-iannone
Copy link
Member

This adds another type of nanoplot, the box plot, bringing the selection up the three. These plots are laid out horizontally and by default the plots across rows share the same axis (since these are primarily meant for comparison across rows). Here's an example of how they look:

library(gt)
library(tidyverse)

dplyr::tibble(a = c(
  paste(rnorm(20, 20, 10), collapse = ","),
  paste(rnorm(100, 0, 5), collapse = ","),
  paste(rnorm(15, 8, 2), collapse = ","),
  paste(rnbinom(120, 10, 0.5), collapse = ","),
  paste(rnbinom(150, 5, 0.25), collapse = ",")
  )) %>%
  gt() %>%
  cols_nanoplot(columns = a, plot_type = "boxplot") %>%
  cols_hide(columns = a)
nanoplots-boxplots

Hovering anywhere in the cell with a box plot will display the values.

@rich-iannone rich-iannone marked this pull request as ready for review January 6, 2024 17:06
@rich-iannone rich-iannone merged commit c1ed008 into master Jan 6, 2024
@rich-iannone rich-iannone deleted the nanoplot-boxplot branch January 6, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant