plot_P.R.CHINA_flag: Plot the national flag of the People's Republic of China

View source: R/plot_national_flag.R

plot_P.R.CHINA_flagR Documentation

Plot the national flag of the People's Republic of China

Description

Draws the national flag of the People's Republic of China at the regulation proportions using pure geometric computation and ggplot2. The shape and orientation of the stars are computed analytically so that each small star points to the centre of the large star. No external image or SVG resources are used, which makes the function suitable for teaching and programmatic graphics.

Usage

plot_P.R.CHINA_flag(label = TRUE)

Arguments

label

Logical; whether to display the title and axis text. If TRUE (default) the title, designer and reference information are shown; if FALSE only the flag is drawn.

Details

  • The flag has a 3:2 aspect ratio.

  • The large star is placed in the upper-left canton.

  • The four small stars are positioned per the specification and rotated to point at the large star.

  • ggplot2::coord_quickmap() keeps a 1:1 x:y ratio.

Value

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

Author(s)

Flag design: Zeng Liansong.

See Also

geom_polygon, coord_quickmap

Examples


plot_P.R.CHINA_flag()
plot_P.R.CHINA_flag(label = FALSE)



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