View source: R/flag_interface.R
| plotCNFlag | R Documentation |
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.
plotCNFlag(input, label = TRUE)
input |
Character string giving the flag to plot, either a Chinese or
an English name; see |
label |
Logical; whether to display the title and text annotations.
Default is |
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.
A ggplot object, which can be printed directly or saved with
ggsave().
FlagStorage for the name list, and the underlying
plotting functions such as plot_P.R.CHINA_flag,
plot_CYLC, and plot_PLA.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.