Explorar el Código

Clean up readme, fix finding images for paint_pomological

pull/1/head
Garrick Aden-Buie hace 8 años
padre
commit
cbafa334fb
Se han modificado 8 ficheros con 25 adiciones y 34 borrados
  1. +2
    -1
      R/paint_pomological.R
  2. +13
    -4
      Readme.Rmd
  3. +10
    -29
      Readme.md
  4. BIN
      Readme_files/figure-gfm/plot-bar-chart-painted.png
  5. BIN
      Readme_files/figure-gfm/plot-demo-painted.png
  6. BIN
      Readme_files/figure-gfm/plot-density-demo-painted.png
  7. BIN
      Readme_files/figure-gfm/plot-full-bar-stack-painted.png
  8. BIN
      Readme_files/figure-gfm/plot-ridges-painted.png

+ 2
- 1
R/paint_pomological.R Ver fichero

@@ -63,6 +63,7 @@ paint_pomological <- function(

pomological_images <- function(which = c("background", "overlay")) {
which <- match.arg(which)
system.file("inst/images", paste0("pomological_", which, ".png"),
exts <- c("background" = ".png", "overlay" = ".jpg")
system.file("images", paste0("pomological_", which, exts[which]),
package = "ggpomological")
}

+ 13
- 4
Readme.Rmd Ver fichero

@@ -9,10 +9,10 @@ editor_options:

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.width=8, fig.height=5)
library(ggpomological)
library(dplyr)
```

[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://img.shields.io/badge/lifecycle-experimental-orange.svg)

## Pomological Plots


@@ -29,6 +29,15 @@ This package provides a ggplot2 theme inspired by the [USDA Pomological Watercol

![](Readme_files/pom-examples.jpg)

## Installation

```r
# If you don't have devtools installed
install.packages("devtools")

devtools::install_github("gadenbuie/ggpomological")
```

## Color Palette

The colors for this theme were drawn from many images from the [USDA Pomological Watercolors collection][usda-pom], I chose just a few that I thought worked well together for color and fill scales
@@ -82,7 +91,7 @@ In the future, I might revisit this package to

We'll need dplyr and ggplot2 (loaded with **ggpomological**)

```{r libraries, messages=FALSE, warning=FALSE}
```r
library(ggpomological)
library(dplyr)
```
@@ -202,7 +211,7 @@ paint_pomological(

### One last plot

(in my handwriting)
Using my own handwriting and the `ggridges` package.

```{r plot-ridges}
ridges_pomological <- ggplot(diamonds) +

+ 10
- 29
Readme.md Ver fichero

@@ -3,8 +3,6 @@ Pomological Colors
Garrick Aden-Buie
2/4/2018

<https://img.shields.io/badge/lifecycle-experimental-orange.svg>

## Pomological Plots

<!-- Links -->
@@ -17,6 +15,15 @@ parameterized RMarkdown](https://youtu.be/Ol1FjFR2IMU?t=5h21m15s) at

![](Readme_files/pom-examples.jpg)

## Installation

``` r
# If you don't have devtools installed
install.packages("devtools")

devtools::install_github("gadenbuie/ggpomological")
```

## Color Palette

The colors for this theme were drawn from many images from the [USDA
@@ -89,25 +96,9 @@ We’ll need dplyr and ggplot2 (loaded with **ggpomological**)

``` r
library(ggpomological)
```

## Loading required package: ggplot2

``` r
library(dplyr)
```

##
## Attaching package: 'dplyr'

## The following objects are masked from 'package:stats':
##
## filter, lag

## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union

### Basic iris plot

``` r
@@ -147,8 +138,6 @@ paint_pomological(pomological_iris, res = 110) %>%
magick::image_write("Readme_files/figure-gfm/plot-demo-painted.png")
```

## Warning: Cannot find file ""

![](Readme_files/figure-gfm/plot-demo-painted.png)

### Stacked bar chart
@@ -175,8 +164,6 @@ paint_pomological(
magick::image_write("Readme_files/figure-gfm/plot-bar-chart-painted.png")
```

## Warning: Cannot find file ""

![](Readme_files/figure-gfm/plot-bar-chart-painted.png)

### Density Plot
@@ -204,8 +191,6 @@ paint_pomological(
magick::image_write("Readme_files/figure-gfm/plot-density-demo-painted.png")
```

## Warning: Cannot find file ""

![](Readme_files/figure-gfm/plot-density-demo-painted.png)

### Points and lines
@@ -250,13 +235,11 @@ paint_pomological(
magick::image_write("Readme_files/figure-gfm/plot-full-bar-stack-painted.png")
```

## Warning: Cannot find file ""

![](Readme_files/figure-gfm/plot-full-bar-stack-painted.png)

### One last plot

(in my handwriting)
Using my own handwriting and the `ggridges` package.

``` r
ridges_pomological <- ggplot(diamonds) +
@@ -274,8 +257,6 @@ paint_pomological(ridges_pomological, res = 110) %>%
magick::image_write("Readme_files/figure-gfm/plot-ridges-painted.png")
```

## Warning: Cannot find file ""

## Picking joint bandwidth of 0.057

![](Readme_files/figure-gfm/plot-ridges-painted.png)

BIN
Readme_files/figure-gfm/plot-bar-chart-painted.png Ver fichero

Antes Después
Anchura: 800  |  Altura: 500  |  Tamaño: 31KB Anchura: 800  |  Altura: 500  |  Tamaño: 536KB

BIN
Readme_files/figure-gfm/plot-demo-painted.png Ver fichero

Antes Después
Anchura: 800  |  Altura: 500  |  Tamaño: 46KB Anchura: 800  |  Altura: 500  |  Tamaño: 542KB

BIN
Readme_files/figure-gfm/plot-density-demo-painted.png Ver fichero

Antes Después
Anchura: 800  |  Altura: 500  |  Tamaño: 44KB Anchura: 800  |  Altura: 500  |  Tamaño: 525KB

BIN
Readme_files/figure-gfm/plot-full-bar-stack-painted.png Ver fichero

Antes Después
Anchura: 800  |  Altura: 500  |  Tamaño: 46KB Anchura: 800  |  Altura: 500  |  Tamaño: 527KB

BIN
Readme_files/figure-gfm/plot-ridges-painted.png Ver fichero

Antes Después
Anchura: 800  |  Altura: 500  |  Tamaño: 48KB Anchura: 800  |  Altura: 500  |  Tamaño: 535KB

Cargando…
Cancelar
Guardar