Technology Sharing

R package: ggsci journal color matching

2024-07-11

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

introduce

The color schemes of different journals are often different. In order to better match the color scheme of journal images, someone developed the R package ggsci. It provides the following functions:

  • scale_color_palname()

  • scale_fill_palname()

Color and fill functions corresponding to different journals.

Import data R package

library("ggsci")
library("ggplot2")
library("gridExtra")

data("diamonds")

p1