Skip to content

Commit

Permalink
reduced dpi optipng
Browse files Browse the repository at this point in the history
  • Loading branch information
nanxstats committed Jul 17, 2021
1 parent e7e0f6b commit f847588
Show file tree
Hide file tree
Showing 22 changed files with 32 additions and 23 deletions.
55 changes: 32 additions & 23 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 5,16 @@ output: github_document
<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
knitr::knit_hooks$set(optipng = knitr::hook_optipng)
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
echo = FALSE,
message = FALSE
message = FALSE,
optipng = "-o1"
)
```

Expand All @@ -23,7 26,9 @@ knitr::opts_chunk$set(
[![Downloads from the RStudio CRAN mirror](https://cranlogs.r-pkg.org/badges/ggsci)](https://cran.r-project.org/package=ggsci)
<!-- badges: end -->

`ggsci` offers a collection of `ggplot2` color palettes inspired by scientific journals, data visualization libraries, science fiction movies, and TV shows.
`ggsci` offers a collection of `ggplot2` color palettes inspired by
scientific journals, data visualization libraries, science fiction movies,
and TV shows.

## Installation

Expand All @@ -39,7 44,8 @@ Or try the development version on GitHub:
remotes::install_github("nanxstats/ggsci")
```

[Browse the vignette](https://nanx.me/ggsci/articles/ggsci.html) (or open with `vignette("ggsci")` in R) for a quick-start guide.
[Browse the vignette](https://nanx.me/ggsci/articles/ggsci.html) (or open with
`vignette("ggsci")` in R) for a quick-start guide.

## Gallery

Expand Down Expand Up @@ -76,87 82,87 @@ p2 <- ggplot(

### NPG

```{r, ggsci-npg, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-npg, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_npg <- p1 scale_color_npg()
p2_npg <- p2 scale_fill_npg()
grid.arrange(p1_npg, p2_npg, ncol = 2)
```

### AAAS

```{r, ggsci-aaas, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-aaas, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_aaas <- p1 scale_color_aaas()
p2_aaas <- p2 scale_fill_aaas()
grid.arrange(p1_aaas, p2_aaas, ncol = 2)
```

### NEJM

```{r, ggsci-nejm, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-nejm, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_nejm <- p1 scale_color_nejm()
p2_nejm <- p2 scale_fill_nejm()
grid.arrange(p1_nejm, p2_nejm, ncol = 2)
```

### Lancet

```{r, ggsci-lancet, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-lancet, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_lancet <- p1 scale_color_lancet()
p2_lancet <- p2 scale_fill_lancet()
grid.arrange(p1_lancet, p2_lancet, ncol = 2)
```

### JAMA

```{r, ggsci-jama, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-jama, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_jama <- p1 scale_color_jama()
p2_jama <- p2 scale_fill_jama()
grid.arrange(p1_jama, p2_jama, ncol = 2)
```

### JCO

```{r, ggsci-jco, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-jco, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_jco <- p1 scale_color_jco()
p2_jco <- p2 scale_fill_jco()
grid.arrange(p1_jco, p2_jco, ncol = 2)
```

### UCSCGB

```{r, ggsci-ucscgb, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-ucscgb, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_ucscgb <- p1 scale_color_ucscgb()
p2_ucscgb <- p2 scale_fill_ucscgb()
grid.arrange(p1_ucscgb, p2_ucscgb, ncol = 2)
```

### D3

```{r, ggsci-d3, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-d3, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_d3 <- p1 scale_color_d3()
p2_d3 <- p2 scale_fill_d3()
grid.arrange(p1_d3, p2_d3, ncol = 2)
```

### LocusZoom

```{r, ggsci-locuszoom, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-locuszoom, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_locuszoom <- p1 scale_color_locuszoom()
p2_locuszoom <- p2 scale_fill_locuszoom()
grid.arrange(p1_locuszoom, p2_locuszoom, ncol = 2)
```

### IGV

```{r, ggsci-igv, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-igv, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_igv <- p1 scale_color_igv()
p2_igv <- p2 scale_fill_igv()
grid.arrange(p1_igv, p2_igv, ncol = 2)
```

### COSMIC

```{r, ggsci-cosmic, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-cosmic, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_cosmic_hallmarks_light <- p1 scale_color_cosmic("hallmarks_light")
p2_cosmic_hallmarks_light <- p2 scale_fill_cosmic("hallmarks_light")
grid.arrange(p1_cosmic_hallmarks_light, p2_cosmic_hallmarks_light, ncol = 2)
Expand All @@ -172,23 178,23 @@ grid.arrange(p1_cosmic_signature, p2_cosmic_signature, ncol = 2)

### UChicago

```{r, ggsci-uchicago, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-uchicago, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_uchicago <- p1 scale_color_uchicago()
p2_uchicago <- p2 scale_fill_uchicago()
grid.arrange(p1_uchicago, p2_uchicago, ncol = 2)
```

### Star Trek

```{r, ggsci-startrek, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-startrek, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_startrek <- p1 scale_color_startrek()
p2_startrek <- p2 scale_fill_startrek()
grid.arrange(p1_startrek, p2_startrek, ncol = 2)
```

### Tron Legacy

```{r, ggsci-tron, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-tron, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_tron <- p1
theme_dark()
theme(
Expand All @@ -210,23 216,23 @@ grid.arrange(p1_tron, p2_tron, ncol = 2)

### Futurama

```{r, ggsci-futurama, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-futurama, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_futurama <- p1 scale_color_futurama()
p2_futurama <- p2 scale_fill_futurama()
grid.arrange(p1_futurama, p2_futurama, ncol = 2)
```

### Rick and Morty

```{r, ggsci-rickandmorty, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-rickandmorty, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_rickandmorty <- p1 scale_color_rickandmorty()
p2_rickandmorty <- p2 scale_fill_rickandmorty()
grid.arrange(p1_rickandmorty, p2_rickandmorty, ncol = 2)
```

### The Simpsons

```{r, ggsci-simpsons, fig.width=10.6667, fig.height=3.3334, dpi=300}
```{r, ggsci-simpsons, fig.width=10.6667, fig.height=3.3334, dpi=227}
p1_simpsons <- p1 scale_color_simpsons()
p2_simpsons <- p2 scale_fill_simpsons()
grid.arrange(p1_simpsons, p2_simpsons, ncol = 2)
Expand All @@ -247,15 253,15 @@ p3 <- ggplot(cor_melt, aes(x = Var1, y = Var2, fill = value))
theme(axis.title.x = element_blank(), axis.title.y = element_blank())
```

```{r, ggsci-gsea, fig.width=10.6667, fig.height=4.000013, dpi=300}
```{r, ggsci-gsea, fig.width=10.6667, fig.height=4.000013, dpi=227}
p3_gsea <- p3 scale_fill_gsea()
p3_gsea_inv <- p3 scale_fill_gsea(reverse = TRUE)
grid.arrange(p3_gsea, p3_gsea_inv, ncol = 2)
```

### Material Design

```{r, ggsci-material, fig.width=10.6667, fig.height=7.111133, dpi=300}
```{r, ggsci-material, fig.width=10.6667, fig.height=7.111133, dpi=227}
set.seed(42)
k <- 9
x <- diag(k)
Expand Down Expand Up @@ -293,4 299,7 @@ grid.arrange(

## Contribute

To contribute to this project, please take a look at the [Contributing Guidelines](CONTRIBUTING.md) first. Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.
To contribute to this project, please take a look at the
[Contributing Guidelines](CONTRIBUTING.md) first. Please note that this project
is released with a [Contributor Code of Conduct](CONDUCT.md). By participating
in this project you agree to abide by its terms.
Binary file modified man/figures/README-ggsci-aaas-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-cosmic-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-cosmic-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-cosmic-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-d3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-futurama-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-gsea-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-igv-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-jama-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-jco-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-lancet-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-locuszoom-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-material-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-nejm-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-npg-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-rickandmorty-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-simpsons-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-startrek-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-tron-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-uchicago-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggsci-ucscgb-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 f847588

Please sign in to comment.