View source: R/plot_national_flag.R
| plot_P.R.CHINA_flag | R Documentation |
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.
plot_P.R.CHINA_flag(label = TRUE)
label |
Logical; whether to display the title and axis text. If
|
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.
A ggplot object, which can be printed directly or saved with
ggsave().
Flag design: Zeng Liansong.
geom_polygon,
coord_quickmap
plot_P.R.CHINA_flag()
plot_P.R.CHINA_flag(label = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.