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

The package includes a comprehensive Chinese traditional color system with 1058 representative colors. You can access colors by name (pinyin or Chinese), create color palettes, and visualize color collections.

Example usage:

library(thisplot)
cc <- ChineseColors()
cc$visual_colors(
  num_per_row = 30,
  title = "Chinese traditional colors",
  name_type = "chinese"
)
show_palettes(
  palettes = get_chinese_palettes()
)

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.

Copy Link

Version

Install

install.packages('thisplot')

Version

0.3.1

License

MIT + file LICENSE

Maintainer

Meng Xu

Last Published

December 17th, 2025

Functions in thisplot (0.3.1)

get_namespace_fun

Get a function from a namespace
get_legend

Extract legend from a plot
extractgrobs

Extract grobs from a list
chinese_colors

Chinese traditional colors dataset
build_patchwork

Build a patchwork gtable
patchwork_grob

Convert a patchwork object to a grob
panel_fix

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

Estimate the fuzzifier parameter m
palette_list

A list of palettes for use in data visualization
print.colors

Print colors object
palette_colors

Color palettes collected
show_palettes

Show the color palettes
print.thisplot_logo

Print logo
segements_df

Shorten and offset the segment
thisplot-package

Utility Functions for Data Visualization and Plotting
thisplot_logo

The logo of thisplot
print.ChineseColors

Print ChineseColors object
head.colors

Return the first part of a colors object
get_vars

Get used vars in a ggplot object
grid_draw

Draw grobs at specified positions
theme_this

The default theme for scop plot function.
theme_blank

Blank theme
standardise

Standardize data by rows
slim_data

Slim unused data in the plot
visual_colors

Visualize colors in HTML widget
simple_colors

Simple random color selection
as_gtable

Convert a plot object to a gtable
Blend2Color

Blend two colors using a specified mode
adjustlayout

Adjust graph layout to avoid node overlaps
drop_data

Drop unused data in the plot
BlendRGBList

Blend a list of colors
as_grob

Convert a plot object to a grob
add_grob

Add a grob to a gtable
adjcolors

Convert a color with specified alpha level
get_chinese_palettes

Get Chinese color palettes
get_colors

Get colors from Chinese colors dataset or palettes
blendcolors

Blends a list of colors using the specified blend mode
ChineseColors

Chinese traditional colors system
RGBA2RGB

Convert RGBA color to RGB with background
check_ci_env

Check CI environment
col2hex

Convert color names to hexadecimal format