Drawing Chinese National and Historical Flags with 'ggplot2'
Overview
Provides programmatic implementations for drawing Chinese national and historical flags using analytic geometry and 'ggplot2'-based vector graphics. Flag designs are constructed entirely from geometric primitives such as polygons and rectangles, without relying on external image files. The package is intended for educational demonstration, reproducible visualization, and procedural graphics in R.
- First stable release.
plot_PLA()gains a new subtype, the flag of the China Armed Police Force (CAPF, 2018-), accessible viasubtype = "武警","CAPF", or"People's Armed Police Force". The lower 3/8 of the flag carries three dark olive-green stripes (each H/12 high with H/24 red gaps), constructed per the official flag image released by the Ministry of National Defense.FlagStorage()andplotCNFlag()now recognise the CAPF flag in both Chinese ("中国人民武装警察部队旗") and English.- Added the package logo (hex sticker) in
man/figures/logo.png, shown in the README and the pkgdown site.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK1 OK2026-07-04
Documentation
- Help pages
- 13
- Examples that run
- 15%2 run in a plain check · 11 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 38%
Downloads
Repository
Releases over time
Commits over time
1 development-tooling and community-health practice detected across 1 family in the upstream repository
Checks run against github.com/xlions/ggchinaflag on 2026-10-25.
Dependencies
Installing ggChinaFlag adds 34 packages (20 with compiled code, 23 MB of source tarballs). Heaviest: ggplot2 6.0 MB, showtextdb 1.9 MB, isoband 1.5 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.0Latest
- 0.4.0
- 0.3.0
- 0.2.02026-07-04
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-07-04
- Total releases
- 4 / 1 yrs
- License
- GPL-3 OSI
- Download size
- 84 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("ggChinaFlag")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.