Title: | Add Some Van Gogh Colors and Overlay Colors on Your 'ggplot()' |
---|---|
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. |
Authors: | Katelyn Diaz [aut, cre] |
Maintainer: | Katelyn Diaz <[email protected]> |
License: | CC0 |
Version: | 0.1.0 |
Built: | 2025-03-09 03:41:18 UTC |
Source: | https://github.com/katelyndiaz/ggrtsy |
Interpolate the color palette
gogh_interpolate(palette = "starryNight", reverse = FALSE, ...)
gogh_interpolate(palette = "starryNight", reverse = FALSE, ...)
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()] |
A color interpolation function. If 'reverse' is TRUE, it returns a reversed color interpolation function.
Different color palettes created from Van Gogh paintings
gogh_palettes_pop
gogh_palettes_pop
An object of class list
of length 8.
This dataset consists of information on 986 colors across Van Gogh paintings.
goghColors
goghColors
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.
Color name
Color RGB value
Color hex code value
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
This dataset consists of information about and colors from all 1931 of Van Gogh's paintings.
goghPaintingSets
goghPaintingSets
A data frame of 1931 rows representing information from Van Gogh's paintings. Consists of 6 variables.
Painting name
5 colors picked from the painting
Year painting was painted
Genre of painting
Style of painting
Link of image of painting
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
Adds up to 5 colors of choice horizontally across a ggplot graph for data emphasis or decoration.
RectangleFiller( plot1, hex_codes = c("red", "blue", "green", "orange", "purple") )
RectangleFiller( plot1, hex_codes = c("red", "blue", "green", "orange", "purple") )
plot1 |
a ggplot with a continuous x-axis |
hex_codes |
series of wanted colors |
ggplot item with colors
Converts RGB colors to Hex code colors
rgbToHex(rgbVec)
rgbToHex(rgbVec)
rgbVec |
a vector of strings in the format "(0, 72, 186)" |
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"
vector of hex code strings in the format "#0048ba"
Creating the color scale for Van Gogh Colors
scale_color_gogh( palette = "starryNight", discrete = TRUE, reverse = FALSE, ... )
scale_color_gogh( palette = "starryNight", discrete = TRUE, reverse = FALSE, ... )
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()] |
A ggplot2 color scale. If 'discrete' is TRUE, it returns a discrete color scale; otherwise, a continuous color scale.
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() }
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
scale_fill_gogh(palette = "sunflowers", discrete = TRUE, reverse = FALSE, ...)
scale_fill_gogh(palette = "sunflowers", discrete = TRUE, reverse = FALSE, ...)
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. |
No return value. Called for side effects.
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() }
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() }