Skip to content

Commit

Permalink
little changes + rightfully deserved credit
Browse files Browse the repository at this point in the history
  • Loading branch information
katelyndiaz committed Sep 14, 2023
1 parent 87c95f6 commit 8f86862
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Authors@R: c(
person("Katelyn", "Diaz", email = "katndiaz@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6108-1682")),
person("Silas", "Weden", email = "sweden@smith.edu", role = "aut"),
person("Tess", "Goldmann", email = "tgoldmann@smith.edu", role = "aut"),
person("Aushanae", "Haller", email = "aushanaenhaller@gmail.com", role = "edt", comment = c(ORCID = "0000-0002-2090-1952"))
person("Aushanae", "Haller", email = "aushanaenhaller@gmail.com", role = "edt", comment = c(ORCID = "0000-0002-2090-1952")),
person("Kathleen", "Hablutzel", email = "krhablutzel@gmail.com", role = "edt", comment = c(ORCID = "0000-0002-7802-6353"))
)
Maintainer: Katelyn Diaz <katndiaz@gmail.com>
Description: Works with 'ggplot2()' to add a Van Gogh color palette to the user’s repertoire.
Expand Down
20 changes: 10 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ knitr::opts_chunk$set(

### Overview

The **ggRtsy** package works with **ggplot2** to add an additional color palette to the user’s repertoire. This is the `goghColors` dataset, which contains the RGB and hex codes of colors picked from Van Gogh paintings. It has been broken down into an easy-to-use color palette based on Van Gogh's most famous paintings, in the `gogh_palettes_pop` list.
The 'ggRtsy' package works with 'ggplot2' to add an additional color palette to the user’s repertoire. This is the `goghColors` dataset, which contains the RGB and hex codes of colors picked from Van Gogh paintings. It has been broken down into an easy-to-use color palette based on Van Gogh's most famous paintings, in the `gogh_palettes_pop` list.

#### Functions within the package:

It also has a function that work alongside ggplot to create more interesting data visualizations and add contextual information to the user’s plots.

- 'RectangleFiller()' - divides data visualizations into a specified number of colored quadrants based on the number of input colors, improving the readability of graphs.
- RectangleFiller() - divides data visualizations into a specified number of colored quadrants based on the number of input colors, improving the readability of graphs.

- 'scale_color_gogh()' - used to color the point/lines of your ggplot
- scale_color_gogh() - used to color the point/lines of your ggplot

- 'scale_fill_gogh()' - used to fill the inner color/bars of your ggplot
- scale_fill_gogh() - used to fill the inner color/bars of your ggplot

- 'rgbToHeX()' - used to convert rgb color codes to hex color codes
- rgbToHeX() - used to convert rgb color codes to hex color codes

- 'gogh_interpolate()' - interpolates between the colors in `gogh_palettes_pop`
- gogh_interpolate() - interpolates between the colors in `gogh_palettes_pop`

### Usage example

Expand All @@ -54,13 +54,13 @@ plotExample <- ggplot(exampleData, aes(x = height, y = mass)) +
scale_x_continuous()
```

Using Hex Codes from the dataset `goghColors`, three colors were added on top of a `ggplot` sample scatter plot. Based on the plot, the function automatically calculated three equal widths of the rectangles, and stretched them to upper and lower bounds on the y-axis.
Using Hex Codes from the dataset `goghColors`, three colors were added on top of a ggplot() sample scatter plot. Based on the plot, the function automatically calculated three equal widths of the rectangles, and stretched them to upper and lower bounds on the y-axis.

```{r ex1, warning=FALSE}
RectangleFiller(plotExample, c("#e32636", "#9966cc", "#f4c2c2"))
```

#### Continuous `scale_color_gogh` example using the `cafeTerrace` color palette:
#### Continuous scale_color_gogh() example using the `cafeTerrace` color palette:

```{r ex2, warning=FALSE, message=FALSE}
ggplot(exampleData, aes(x = height, y = mass, color = birth_year)) +
Expand All @@ -69,7 +69,7 @@ ggplot(exampleData, aes(x = height, y = mass, color = birth_year)) +
theme_minimal()
```

#### Discrete `scale_fill_gogh` example using the `almondBlossoms` color palette:
#### Discrete scale_fill_gogh() example using the `almondBlossoms` color palette:

```{r ex3, warning=FALSE, message=FALSE}
ggplot(storms, aes(x = category, fill = status)) +
Expand All @@ -78,7 +78,7 @@ ggplot(storms, aes(x = category, fill = status)) +
theme_minimal()
```

This package also comes with `rgbToHex`, converting rgb colors into hex code colors.
This package also comes with rgbToHex(), converting rgb colors into hex code colors.

```{r}
rgbToHex(c("(225, 104, 39)", "(60, 90, 202)"))
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ status](https://www.r-pkg.org/badges/version/ggRtsy)](https://CRAN.R-project.org

### Overview

The **ggRtsy** package works with **ggplot2** to add an additional color
The ggRtsy package works with ggplot2 to add an additional color
palette to the user’s repertoire. This is the `goghColors` dataset,
which contains the RGB and hex codes of colors picked from Van Gogh
paintings. It has been broken down into an easy-to-use color palette
Expand All @@ -27,23 +27,23 @@ It also has a function that work alongside ggplot to create more
interesting data visualizations and add contextual information to the
user’s plots.

- RectangleFiller() - divides data visualizations into a specified
- RectangleFiller() - divides data visualizations into a specified
number of colored quadrants based on the number of input colors,
improving the readability of graphs.

- scale_color_gogh() - used to color the point/lines of your ggplot
- scale_color_gogh() - used to color the point/lines of your ggplot

- scale_fill_gogh() - used to fill the inner color/bars of your ggplot
- scale_fill_gogh() - used to fill the inner color/bars of your ggplot

- rgbToHeX() - used to convert rgb color codes to hex color codes
- rgbToHeX() - used to convert rgb color codes to hex color codes

- gogh_interpolate() - interpolates between the colors in
- gogh_interpolate() - interpolates between the colors in
`gogh_palettes_pop`

### Usage example

Using Hex Codes from the dataset `goghColors`, three colors were added
on top of a `ggplot` sample scatter plot. Based on the plot, the
on top of a ggplot() sample scatter plot. Based on the plot, the
function automatically calculated three equal widths of the rectangles,
and stretched them to upper and lower bounds on the y-axis.

Expand All @@ -53,7 +53,7 @@ RectangleFiller(plotExample, c("#e32636", "#9966cc", "#f4c2c2"))

![](README_files/figure-gfm/ex1-1.png)<!-- -->

#### Continuous `scale_color_gogh` example using the `cafeTerrace` color palette:
#### Continuous scale_color_gogh() example using the `cafeTerrace` color palette:

``` r
ggplot(exampleData, aes(x = height, y = mass, color = birth_year)) +
Expand All @@ -64,7 +64,7 @@ ggplot(exampleData, aes(x = height, y = mass, color = birth_year)) +

![](README_files/figure-gfm/ex2-1.png)<!-- -->

#### Discrete `scale_fill_gogh` example using the `almondBlossoms` color palette:
#### Discrete scale_fill_gogh() example using the `almondBlossoms` color palette:

``` r
ggplot(storms, aes(x = category, fill = status)) +
Expand All @@ -75,7 +75,7 @@ ggplot(storms, aes(x = category, fill = status)) +

![](README_files/figure-gfm/ex3-1.png)<!-- -->

This package also comes with `rgbToHex`, converting rgb colors into hex
This package also comes with rgbToHex(), converting rgb colors into hex
code colors.

``` r
Expand Down
Binary file modified README_files/figure-gfm/ex3-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 8f86862

Please sign in to comment.