Introduction to the

This is a short story I saw through the video of art Painting. Monet’s color matching is really advanced. So xiaobian had such an idea: although I can’t draw, but I can draw scientific research map ah! As a power porter, I moved this color match to the public account, and tried to use these colors to join the R visualization.

Oscar Claude Monet (14 November 1840 — 5 December 1926) was a French painter and painter. He was one of the founders of the impressionist movement.

Monet was one of the most important painters in France, and he popularized most of the theory and practice of Impressionism. Monet specializes in light and shadow experiments and techniques of expression. His most important style was to change the way he painted shadows and Outlines. You don’t see very clear shadows in Monet’s paintings, you don’t see sharp or flat Outlines. The color depiction of light and shadow is the biggest characteristic of Monet’s paintings.

Monet painting color matching

How is it used in ggplot?

First, we need to know that these color schemes are discrete and suitable for discrete data (classification). Here we use the GGploT2 package to give a simple usage method.

  1. Load packages and generate data sets (I’m doing this randomly)
# library
library(ggplot2)

# create a dataset
specie <- c(rep("sorgho" , 5),rep("poacee" , 5)  )
class <- rep(c("A"."B"."C"."D"."E"),2)
value <- abs(rnorm(10 , 0 , 15))
data <- data.frame(specie,class,value)
Copy the code

  1. Enter your desired Monet color scheme manually and store it in a variable (COLs). The following color scheme is used here.
cols = c("#9BA5A4"."#C4B0A1"."#DCCCB8"."#5B7352"."294925")
Copy the code

  1. Use ggPlot to plot!
ggplot(data, aes(fill=class, y=value, x=specie)) + 
  geom_bar(position="dodge", stat="identity") +
  scale_fill_manual(values = cols) + 
  theme_bw() +
  theme(panel.grid = element_blank())
Copy the code

Other color schemes are used in a similar way, which I won’t go into too much here.

Xiaobian has something to say

  • This tweet is a record of their own, later their useful to match the color, you can come to find. Of course, it is also a good choice for readers. Welcome to forward, share and like! It is not easy to make, thanks for your support!
  • If you are not familiar with R visualization, I recommend you to read the introduction to visualization tutorial I wrote earlier.Visual document]) can be obtained, and combined with B station I on the live course, synchronous learning, better effect!