MyNixOS website logo
Description

Utility Functions for Plotting.

Provides utility functions for plotting. Includes functions for color manipulation, plot customization, panel size control, data optimization for plots, and layout adjustments.

thisplot

CRAN_Status_Badge version R-CMD-check test-coverage pkgdown RStudio CRAN mirrordownloads

Introduction

thisplot is an R package providing utility functions for data visualization and plotting. It includes tools for color manipulation (blending, conversion, palettes), plot customization (themes, grob operations, patchwork building), panel size control, data optimization for plots, and layout adjustments. Designed to enhance workflows with ggplot2, patchwork, and ComplexHeatmap.

Chinese traditional colors

thisplot provides a comprehensive Chinese traditional color system with 1058 representative colors. Use ChineseColors() to create a color object, access colors by name (pinyin or Chinese), visualize the collection with visual_colors(), and retrieve specific palettes using get_colors().

Example usage:

library(thisplot)
cc <- ChineseColors()
cc
#> 
#> ── Chinese Traditional Colors System
#> 
#> ── Total 1058 colors
#> • blue: 92 colors
#> • cyan: 51 colors
#> • gray_brown: 323 colors
#> • green: 123 colors
#> • orange: 92 colors
#> • purple: 95 colors
#> • red: 181 colors
#> • yellow: 101 colors
#> 
#> ── Methods:
#> • visual_colors(loc_range, num_per_row, title, name_type)
#> 
#> ── See also:
#> • [get_colors()] for searching colors
cc$visual_colors(
  loc_range = c(1, 180),
  num_per_row = 30,
  title = "Chinese traditional colors",
  name_type = "chinese"
)
Chinese traditional colors








































































































































绿


绿
























西









绿




绿
























绿

绿






绿


绿


绿

绿

绿



绿





绿






绿



绿


绿







绿



绿



绿


绿


绿


绿
get_colors("Paired")
#> 
#> ── Found palette: "Paired"
#>       name             rgb     hex
#> 1  #A6CEE3 (166, 206, 227) #A6CEE3
#> 2  #1F78B4  (31, 120, 180) #1F78B4
#> 3  #B2DF8A (178, 223, 138) #B2DF8A
#> 4  #33A02C   (51, 160, 44) #33A02C
#> 5  #FDBF6F (253, 191, 111) #FDBF6F
#> 6  #FF7F00   (255, 127, 0) #FF7F00
#> 7  #FB9A99 (251, 154, 153) #FB9A99
#> 8  #E31A1C   (227, 26, 28) #E31A1C
#> 9  #CAB2D6 (202, 178, 214) #CAB2D6
#> 10 #6A3D9A  (106, 61, 154) #6A3D9A
#> 11 #FFFF99 (255, 255, 153) #FFFF99
#> 12 #B15928   (177, 89, 40) #B15928
get_colors("cyan", palettes = "ChineseSet64")
#> 
#> ── Searching in palette: "ChineseSet64"
#> 
#> ── Found in:
#> #29B7CB: "ChineseSet64"
#> #10AEC2: "ChineseSet64"
#> #0EB0C9: "ChineseSet64"
#> #1E9EB3: "ChineseSet64"
#> #0F95B0: "ChineseSet64"
#> #1491A8: "ChineseSet64"
#> #108B96: "ChineseSet64"
#>     num        name name_ch            rgb     hex category category_ch
#> 111  98      weilan    蔚蓝 (41, 183, 203) #29B7CB     cyan          青
#> 113  99   dianzilan  甸子蓝 (16, 174, 194) #10AEC2     cyan          青
#> 112 100  kongquelan  孔雀蓝 (14, 176, 201) #0EB0C9     cyan          青
#> 114 101      cuilan    翠蓝 (30, 158, 179) #1E9EB3     cyan          青
#> 115 102   danfanlan  胆矾蓝 (15, 149, 176) #0F95B0     cyan          青
#> 116 103 jianniaolan  樫鸟蓝 (20, 145, 168) #1491A8     cyan          青
#> 103 104       facui    法翠 (16, 139, 150) #108B96     cyan          青

Installation

Install CRAN version:

install.packages("thisplot")
# or
if (!require("pak", quietly = TRUE)) {
  install.packages("pak")
}
pak::pak("thisplot")

Install development version from GitHub use pak:

if (!require("pak", quietly = TRUE)) {
  install.packages("pak")
}
pak::pak("mengxu98/thisplot")

Usage

Please reference here.

Metadata

Version

0.4.0

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • 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-linux
  • 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
  • sh4-linux
  • 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-uefi
  • x86_64-windows