ggstar
provides geoms for ggplot2 to create
more easily discernible shapes:
geom_star
And the default is:
c(1, 13, 15, 11, 12, 14, 29, 2, 27)[seq_len(n)]
.
n
is the number of shapes you want to use.
ggstar
has been submitted on CRAN, you can use the following
to install it.
geom_star
is similar to geom_point
of ggplot2. The
difference point is geom_star
use starshape
to
mapping the starshapes
. The another is
geom_star
use scale_starshape_manual
for
manual scale. And the shapes will be not distorted on cartesian
coordinates or polar coordinates.
If you have questions/issues, please visit github issue tracker.
Here is the output of sessionInfo() on the system on which this document was compiled:
## R version 4.4.1 (2024-06-14)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Etc/UTC
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] ggstar_1.0.4.002 ggplot2_3.5.1 prettydoc_0.4.1
##
## loaded via a namespace (and not attached):
## [1] vctrs_0.6.5 cli_3.6.3 knitr_1.48 rlang_1.1.4
## [5] xfun_0.49 highr_0.11 jsonlite_1.8.9 labeling_0.4.3
## [9] glue_1.8.0 colorspace_2.1-1 buildtools_1.0.0 htmltools_0.5.8.1
## [13] maketools_1.3.1 gridExtra_2.3 sys_3.4.3 sass_0.4.9
## [17] fansi_1.0.6 scales_1.3.0 rmarkdown_2.28 grid_4.4.1
## [21] tibble_3.2.1 evaluate_1.0.1 munsell_0.5.1 jquerylib_0.1.4
## [25] fastmap_1.2.0 yaml_2.3.10 lifecycle_1.0.4 compiler_4.4.1
## [29] pkgconfig_2.0.3 farver_2.1.2 digest_0.6.37 R6_2.5.1
## [33] utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 bslib_0.8.0
## [37] withr_3.0.2 tools_4.4.1 gtable_0.3.6 cachem_1.1.0