Type: | Package |
Title: | Add Some Van Gogh Colors and Overlay Colors on Your 'ggplot()' |
Version: | 0.1.0 |
Maintainer: | Katelyn Diaz <katndiaz@gmail.com> |
Description: | Works with 'ggplot2' to add a Van Gogh color palette to the user’s repertoire. It also has a function that work alongside 'ggplot2' to create more interesting data visualizations and add contextual information to the user’s plots. |
License: | CC0 |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | R (≥ 2.10) |
RoxygenNote: | 7.2.3 |
Imports: | purrr, stringr, ggplot2, tibble, magrittr, grDevices, dplyr |
Suggests: | rmarkdown, knitr, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2023-09-14 16:34:54 UTC; katelyndiaz |
Author: | Katelyn Diaz |
Repository: | CRAN |
Date/Publication: | 2023-09-15 19:12:05 UTC |
Adds transparent coloring horizontally across a ggplot
Description
Adds up to 5 colors of choice horizontally across a ggplot graph for data emphasis or decoration.
Usage
RectangleFiller(
plot1,
hex_codes = c("red", "blue", "green", "orange", "purple")
)
Arguments
plot1 |
a ggplot with a continuous x-axis |
hex_codes |
series of wanted colors |
Value
ggplot item with colors
Sampling of Colors from Van Gogh Paintings
Description
This dataset consists of information on 986 colors across Van Gogh paintings.
Usage
goghColors
Format
A data frame of 986 rows representing colors selected from Van Gogh's painting. 5 colors were selected from each painting. Consists of 3 variables.
- name
Color name
- rgb
Color RGB value
- hex
Color hex code value
Source
Kaggle Konstantinos Katserelis <https://www.kaggle.com/datasets/pointblanc/colors-of-van-gogh?select=color_space.csv> Note data is released under CC BY-SA 4.0
Van Gogh Paintings Information
Description
This dataset consists of information about and colors from all 1931 of Van Gogh's paintings.
Usage
goghPaintingSets
Format
A data frame of 1931 rows representing information from Van Gogh's paintings. Consists of 6 variables.
- name
Painting name
- colors
5 colors picked from the painting
- year
Year painting was painted
- genre
Genre of painting
- style
Style of painting
- link
Link of image of painting
Source
Kaggle Konstantinos Katserelis <https://www.kaggle.com/datasets/pointblanc/colors-of-van-gogh?select=color_space.csv> Note data is released under CC BY-SA 4.0
Interpolate the color palette
Description
Interpolate the color palette
Usage
gogh_interpolate(palette = "starryNight", reverse = FALSE, ...)
Arguments
palette |
the ggRtsy painting color palette of choice |
reverse |
Boolean, will be TRUE if the user wants the palette reversed |
... |
further arguments passed to [ggRtsy::gogh_interpolate()] |
Value
A color interpolation function. If 'reverse' is TRUE, it returns a reversed color interpolation function.
Different color palettes created from Van Gogh paintings
Description
Different color palettes created from Van Gogh paintings
Usage
gogh_palettes_pop
Format
An object of class list
of length 8.
Converts RGB colors to Hex code colors
Description
Converts RGB colors to Hex code colors
Usage
rgbToHex(rgbVec)
Arguments
rgbVec |
a vector of strings in the format "(0, 72, 186)" |
Details
Taking input of a vector of RGB values in the format "(0, 72, 186)", etc, and returns the corresponding hex value in the format "#0048ba"
Value
vector of hex code strings in the format "#0048ba"
Creating the color scale for Van Gogh Colors
Description
Creating the color scale for Van Gogh Colors
Usage
scale_color_gogh(
palette = "starryNight",
discrete = TRUE,
reverse = FALSE,
...
)
Arguments
palette |
the ggRtsy painting color palette of choice |
discrete |
Boolean if color aesthetic is discrete |
reverse |
Boolean, will be TRUE if the user wants the palette reversed |
... |
further arguments passed to [ggRtsy::scale_color_gogh()] |
Value
A ggplot2 color scale. If 'discrete' is TRUE, it returns a discrete color scale; otherwise, a continuous color scale.
Examples
if (require(ggplot2)) {
data <- data.frame(c = LETTERS[1:3],x = c(1,5,7),y = c(5,9,13))
ggplot(data, aes(x,y,color = c))+geom_point()+scale_color_gogh()
}
Creating the color fill scale for Van Gogh Colors
Description
Creating the color fill scale for Van Gogh Colors
Usage
scale_fill_gogh(palette = "sunflowers", discrete = TRUE, reverse = FALSE, ...)
Arguments
palette |
Character name of palette in gogh_palettes_pop |
discrete |
Boolean if color aesthetic is discrete |
reverse |
Boolean if the palette should be reversed |
... |
Additional arguments used to discrete_scale() or scale_fill_gradientn() to automatically interpolate between colors. |
Value
No return value. Called for side effects.
Examples
if (require(ggplot2)) {
data <- data.frame(c = LETTERS[1:3],x = c(1,5,7),y = c(5,9,13))
ggplot(data, aes(x,fill=c))+geom_bar()+scale_fill_gogh()
}