瀏覽代碼

Clean up readme, fix finding images for paint_pomological

pull/1/head
Garrick Aden-Buie 8 年之前
父節點
當前提交
cbafa334fb
共有 8 個檔案被更改,包括 25 行新增34 行删除
  1. +2
    -1
      R/paint_pomological.R
  2. +13
    -4
      Readme.Rmd
  3. +10
    -29
      Readme.md
  4. 二進制
      Readme_files/figure-gfm/plot-bar-chart-painted.png
  5. 二進制
      Readme_files/figure-gfm/plot-demo-painted.png
  6. 二進制
      Readme_files/figure-gfm/plot-density-demo-painted.png
  7. 二進制
      Readme_files/figure-gfm/plot-full-bar-stack-painted.png
  8. 二進制
      Readme_files/figure-gfm/plot-ridges-painted.png

+ 2
- 1
R/paint_pomological.R 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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)

二進制
Readme_files/figure-gfm/plot-bar-chart-painted.png 查看文件

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

二進制
Readme_files/figure-gfm/plot-demo-painted.png 查看文件

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

二進制
Readme_files/figure-gfm/plot-density-demo-painted.png 查看文件

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

二進制
Readme_files/figure-gfm/plot-full-bar-stack-painted.png 查看文件

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

二進制
Readme_files/figure-gfm/plot-ridges-painted.png 查看文件

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

Loading…
取消
儲存