plotCNFlag: Plot a Chinese national, historical, party, regional,...

View source: R/flag_interface.R

plotCNFlagR Documentation

Plot a Chinese national, historical, party, regional, organisation, or military 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 the appropriate plotting function. Supported functions include plot_P.R.CHINA_flag, plot_ROC_KMT_flag, plot_ROC_Beiyang_flag, plot_Han18Star, plot_CCP, plot_KMT, plot_HK_SAR_flag, plot_Macao_SAR_flag, plot_CYLC, and plot_PLA (for the general PLA flag and its service branches). 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, plot_CYLC, and plot_PLA.

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")
plotCNFlag("Regional Flag of the Hong Kong Special Administrative Region")
plotCNFlag("Regional Flag of the Macao Special Administrative Region", label = FALSE)
plotCNFlag("\u4e2d\u56fd\u5171\u4ea7\u4e3b\u4e49\u9752\u5e74\u56e2\u56e2\u65d7")
plotCNFlag("\u4e2d\u56fd\u4eba\u6c11\u89e3\u653e\u519b\u6d77\u519b\u519b\u65d7")
plotCNFlag("PLA Rocket Force Flag", label = FALSE)



ggChinaFlag documentation built on Oct. 1, 2026, 5:11 p.m.