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 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.
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.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.