MyNixOS website logo
Description

Add Some Van Gogh Colors and Overlay Colors on Your 'ggplot()'.

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.

ggRtsy

R-CMD-check R CRANstatus

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.

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.

  • 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

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

  • 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 function automatically calculated three equal widths of the rectangles, and stretched them to upper and lower bounds on the y-axis.

RectangleFiller(plotExample, c("#e32636", "#9966cc", "#f4c2c2"))

Continuous scale_color_gogh() example using the cafeTerrace color palette:

ggplot(exampleData, aes(x = height, y = mass, color = birth_year)) +
  geom_point(size = 3) +
  scale_color_gogh(palette = "cafeTerrace", discrete = FALSE, reverse = TRUE) +
  theme_minimal()

Discrete scale_fill_gogh() example using the almondBlossoms color palette:

ggplot(storms, aes(x = category, fill = status)) +
  geom_bar() +
  scale_fill_gogh(palette = "almondBlossoms", discrete = TRUE, reverse = FALSE) +
  theme_minimal()

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

rgbToHex(c("(225, 104, 39)", "(60, 90, 202)"))
#> [1] "#e16827" "#3c5aca"

Installation instructions

Get the development version from GitHub:

# Install remotes if needed:
# install.packages("remotes")
remotes::install_github("katelyndiaz/ggRtsy")

And load it with

library(ggRtsy)

Palettes

starryNight = ‘#23338C’, ‘#30478C’, ‘#5377A6’, ‘#BDBF7E’, ‘#BFA72C’

sunflowers = ‘#74A629’, ‘#F2EB80’, ‘#F2E085’, ‘#BF9821’, ‘#A6681C’

selfPortrait = ‘#021F59’, ‘#63A5BF’, ‘#8C701C’, ‘#BF9B6F’, ‘#730202’

wheatField = ‘#73A9D9’, ‘#477332’, ‘#D9B13B’, ‘#D98E32’, ‘#A66329’

cafeTerrace = ‘#2A6BBF’, ‘#3F6CA6’, ‘#F2C84B’, ‘#D99036’, ‘#BF6734’

rhoneStarry = ‘#073359’, ‘#27668C’, ‘#5A98BF’, ‘#60734D’, ‘#A3A658’

irises = ‘#415AA6’, ‘#6382BF’, ‘#65A67C’, ‘#8CA653’, ‘#A66D58’

almondBlossoms = ‘#236E8C’, ‘#20788C’, ‘#49B3BF’, ‘#41BFBF’, ‘#BDBF75’

See also

Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows