Skip to content

Commit

Permalink
Add Bootstrap 5 color palettes to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nanxstats committed Jun 16, 2024
1 parent 4564821 commit 9a629e2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ p3_gsea_inv <- p3 + scale_fill_gsea(reverse = TRUE)
grid.arrange(p3_gsea, p3_gsea_inv, ncol = 2)
```

### Material Design
### Bootstrap 5

```{r, ggsci-material, fig.height=3.8}
```{r}
set.seed(42)
k <- 6
x <- diag(k)
Expand All @@ -325,7 +325,23 @@ p4 <- ggplot(x_melt, aes(x = Var1, y = Var2, fill = value)) +
panel.background = element_blank(), panel.border = element_blank(),
panel.grid.major = element_blank(), panel.grid.minor = element_blank()
)
```

```{r, ggsci-bs5, fig.height=2.6}
grid.arrange(
p4 + scale_fill_bs5("blue"), p4 + scale_fill_bs5("indigo"),
p4 + scale_fill_bs5("purple"), p4 + scale_fill_bs5("pink"),
p4 + scale_fill_bs5("red"), p4 + scale_fill_bs5("orange"),
p4 + scale_fill_bs5("yellow"), p4 + scale_fill_bs5("green"),
p4 + scale_fill_bs5("teal"), p4 + scale_fill_bs5("cyan"),
p4 + scale_fill_bs5("gray"),
ncol = 8
)
```

### Material Design

```{r, ggsci-material, fig.height=3.8}
grid.arrange(
p4 + scale_fill_material("red"), p4 + scale_fill_material("pink"),
p4 + scale_fill_material("purple"), p4 + scale_fill_material("deep-purple"),
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ open with `vignette("ggsci")` in R) for a quick-start guide.

<img src="man/figures/README-ggsci-gsea-1.png" width="100%" style="display: block; margin: auto;" />

### Bootstrap 5

<img src="man/figures/README-ggsci-bs5-1.png" width="100%" style="display: block; margin: auto;" />

### Material Design

<img src="man/figures/README-ggsci-material-1.png" width="100%" style="display: block; margin: auto;" />
Expand Down
Binary file added man/figures/README-ggsci-bs5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9a629e2

Please sign in to comment.