Przeglądaj źródła

Clean up readme, fix finding images for paint_pomological

pull/1/head
Garrick Aden-Buie 8 lat temu
rodzic
commit
cbafa334fb
8 zmienionych plików z 25 dodań i 34 usunięć
  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 Wyświetl plik



pomological_images <- function(which = c("background", "overlay")) { pomological_images <- function(which = c("background", "overlay")) {
which <- match.arg(which) 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") package = "ggpomological")
} }

+ 13
- 4
Readme.Rmd Wyświetl plik



```{r setup, include=FALSE} ```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.width=8, fig.height=5) 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 ## Pomological Plots






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


## Installation

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

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

## Color Palette ## 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 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


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


```{r libraries, messages=FALSE, warning=FALSE}
```r
library(ggpomological) library(ggpomological)
library(dplyr) library(dplyr)
``` ```


### One last plot ### One last plot


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


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

+ 10
- 29
Readme.md Wyświetl plik

Garrick Aden-Buie Garrick Aden-Buie
2/4/2018 2/4/2018


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

## Pomological Plots ## Pomological Plots


<!-- Links --> <!-- Links -->


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


## Installation

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

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

## Color Palette ## Color Palette


The colors for this theme were drawn from many images from the [USDA The colors for this theme were drawn from many images from the [USDA


``` r ``` r
library(ggpomological) library(ggpomological)
```

## Loading required package: ggplot2

``` r
library(dplyr) 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 ### Basic iris plot


``` r ``` r
magick::image_write("Readme_files/figure-gfm/plot-demo-painted.png") magick::image_write("Readme_files/figure-gfm/plot-demo-painted.png")
``` ```


## Warning: Cannot find file ""

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


### Stacked bar chart ### Stacked bar chart
magick::image_write("Readme_files/figure-gfm/plot-bar-chart-painted.png") 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) ![](Readme_files/figure-gfm/plot-bar-chart-painted.png)


### Density Plot ### Density Plot
magick::image_write("Readme_files/figure-gfm/plot-density-demo-painted.png") 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) ![](Readme_files/figure-gfm/plot-density-demo-painted.png)


### Points and lines ### Points and lines
magick::image_write("Readme_files/figure-gfm/plot-full-bar-stack-painted.png") 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) ![](Readme_files/figure-gfm/plot-full-bar-stack-painted.png)


### One last plot ### One last plot


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


``` r ``` r
ridges_pomological <- ggplot(diamonds) + ridges_pomological <- ggplot(diamonds) +
magick::image_write("Readme_files/figure-gfm/plot-ridges-painted.png") magick::image_write("Readme_files/figure-gfm/plot-ridges-painted.png")
``` ```


## Warning: Cannot find file ""

## Picking joint bandwidth of 0.057 ## Picking joint bandwidth of 0.057


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

BIN
Readme_files/figure-gfm/plot-bar-chart-painted.png Wyświetl plik

Before After
Width: 800  |  Height: 500  |  Size: 31KB Width: 800  |  Height: 500  |  Size: 536KB

BIN
Readme_files/figure-gfm/plot-demo-painted.png Wyświetl plik

Before After
Width: 800  |  Height: 500  |  Size: 46KB Width: 800  |  Height: 500  |  Size: 542KB

BIN
Readme_files/figure-gfm/plot-density-demo-painted.png Wyświetl plik

Before After
Width: 800  |  Height: 500  |  Size: 44KB Width: 800  |  Height: 500  |  Size: 525KB

BIN
Readme_files/figure-gfm/plot-full-bar-stack-painted.png Wyświetl plik

Before After
Width: 800  |  Height: 500  |  Size: 46KB Width: 800  |  Height: 500  |  Size: 527KB

BIN
Readme_files/figure-gfm/plot-ridges-painted.png Wyświetl plik

Before After
Width: 800  |  Height: 500  |  Size: 48KB Width: 800  |  Height: 500  |  Size: 535KB

Ładowanie…
Anuluj
Zapisz