1. Introduction
ggstar
provides geoms for ggplot2 to create more easily discernible shapes:
geom_star
And the default is: c(1, 2, 9, 4, 3, 5, 6, 11, 12)[seq_len(n)]
. n
is the number of shapes you want to use.
2. Install
ggstar
hasn’t been submitted on CRAN, you can use the following to install it.
3. Usage
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.
4. Need helps?
If you have questions/issues, please visit github issue tracker.
5. Session information
Here is the output of sessionInfo() on the system on which this document was compiled:
## R version 3.6.1 (2019-07-05)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.4 LTS
##
## Matrix products: default
## BLAS: /mnt/d/UbuntuApps/R/3.6.1/lib/R/lib/libRblas.so
## LAPACK: /mnt/d/UbuntuApps/R/3.6.1/lib/R/lib/libRlapack.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [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
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] ggstar_0.0.4 ggplot2_3.3.0
##
## loaded via a namespace (and not attached):
## [1] Rcpp_1.0.3 knitr_1.28 magrittr_1.5 tidyselect_1.0.0
## [5] munsell_0.5.0 colorspace_1.4-1 R6_2.4.1 rlang_0.4.4
## [9] dplyr_0.8.4 stringr_1.4.0 tools_3.6.1 grid_3.6.1
## [13] gtable_0.3.0 xfun_0.12 withr_2.1.2 htmltools_0.4.0
## [17] assertthat_0.2.1 yaml_2.2.1 digest_0.6.24 tibble_2.1.3
## [21] lifecycle_0.1.0 crayon_1.3.4 gridExtra_2.3 farver_2.0.3
## [25] purrr_0.3.3 prettydoc_0.3.1 glue_1.3.1 evaluate_0.14
## [29] rmarkdown_2.1 labeling_0.3 stringi_1.4.5 compiler_3.6.1
## [33] pillar_1.4.3 scales_1.1.0 pkgconfig_2.0.3