Learn R Programming

thisplot

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"
)

Copy Link

Version

Install

install.packages('thisplot')

Monthly Downloads

1,047

Version

0.3.7

License

MIT + file LICENSE

Maintainer

Meng Xu

Last Published

April 2nd, 2026

Functions in thisplot (0.3.7)

mestimate

Estimate the fuzzifier parameter m
show_palettes

Show the color palettes
grid_draw

Draw grobs at specified positions
palette_colors

Color palettes collected
simple_colors

Simple random color selection
slim_data

Slim unused data in the plot
get_vars

Get used vars in a ggplot object
print.thisplot_logo

Print logo
print.ChineseColors

Print ChineseColors object
visual_colors

Visualize colors in HTML widget
theme_this

The default theme for scop plot function.
theme_sankey

Themes for sankey plot
patchwork_grob

Convert a patchwork object to a grob
print.colors

Print colors object
make_long

Make a long data frame for sankey plot
heatmap_rendersize

Estimate heatmap render size
head.colors

Return the first part of a colors object
normalize_drawable

Normalize drawable objects to grobs
get_legend

Extract legend from a plot
heatmap_fixsize

Compute fixed heatmap device size
segements_df

Shorten and offset the segment
palette_list

A list of palettes for use in data visualization
panel_fix

Set the panel width/height of a plot to a fixed value
standardise

Standardize data by rows
theme_blank

Blank theme
thisplot_logo

The logo of thisplot
thisplot-package

Utility Functions for Data Visualization and Plotting
add_grob

Add a grob to a gtable
RGBA2RGB

Convert RGBA color to RGB with background
StatPlot

Statistic Plot
adjustlayout

Adjust graph layout to avoid node overlaps
adjcolors

Convert a color with specified alpha level
GraphPlot

Graph Plot
Blend2Color

Blend two colors using a specified mode
annotation_block_fill_graphics

Build block fill panel function
ChineseColors

Chinese traditional colors system
BlendRGBList

Blend a list of colors
annotation_block_graphics

Build block panel function
annotation_graphics

Build graphics callback list for anno_customize
as_gtable

Convert a plot object to a gtable
as_grob

Convert a plot object to a grob
build_patchwork

Build a patchwork gtable
chinese_colors

Chinese traditional colors dataset
build_heatmap_annotation

Build HeatmapAnnotation with safe parameter merge
blendcolors

Blends a list of colors using the specified blend mode
cluster_within_group2

Cluster within group
col2hex

Convert color names to hexadecimal format
geom_alluvial

geom_alluvial
compute_velocity_on_grid

Compute velocity on grid
geom_sankey_bump

geom_sankey_bump
get_chinese_palettes

Get Chinese color palettes
geom_sankey

geom_sankey
geom_alluvial_label

geom_alluvial_label
geom_sankey_label

geom_sankey_label
extractgrobs

Extract grobs from a list
drop_data

Drop unused data in the plot
get_colors

Get colors from Chinese colors dataset or palettes