plotCNFlag: Plot a Chinese national or historical flag by name

View source: R/flag_interface.R

plotCNFlagR Documentation

Plot a Chinese national or historical flag by name

Description

A unified interface that dispatches to the appropriate low-level plotting function based on the supplied flag name (Chinese or English) and returns a ggplot object.

Usage

plotCNFlag(input, label = TRUE)

Arguments

input

Character string giving the flag to plot, either a Chinese or an English name; see FlagStorage for the supported names.

label

Logical; whether to display the title and text annotations. Default is TRUE.

Details

The function obtains the built-in name list via FlagStorage, detects the input language, matches the name, and forwards to one of plot_P.R.CHINA_flag, plot_ROC_KMT_flag, plot_ROC_Beiyang_flag, plot_Han18Star, plot_CCP or plot_KMT. An unrecognised name raises an error.

Value

A ggplot object, which can be printed directly or saved with ggsave().

See Also

FlagStorage for the name list, and the underlying plotting functions such as plot_P.R.CHINA_flag.

Examples


plotCNFlag("Flag of the People's Republic of China")
plotCNFlag("Flag of the Kuomintang (Blue Sky and White Sun flag)", label = FALSE)
plotCNFlag("Five-Color Flag of the Beiyang Government of the Republic of China")
plotCNFlag("Iron-Blood 18-Star Flag of the Wuchang Uprising")



ggChinaFlag documentation built on July 4, 2026, 9:07 a.m.