ggpolar

polar: Dots and Their Connections in Polar Coordinate System

https://github.com/shixiangwang/polar

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary

Keywords

ggplot2-enhancements
Last synced: 9 months ago · JSON representation

Repository

polar: Dots and Their Connections in Polar Coordinate System

Basic Info
Statistics
  • Stars: 9
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
ggplot2-enhancements
Created over 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# ggpolar: Dots and Their Connections in Polar Coordinate System

[![ggpolar status badge](https://shixiangwang.r-universe.dev/badges/ggpolar)](https://shixiangwang.r-universe.dev)
[![CRAN
status](https://www.r-pkg.org/badges/version/ggpolar)](https://CRAN.R-project.org/package=ggpolar)
[![](https://cranlogs.r-pkg.org/badges/grand-total/ggpolar?color=blue)](https://cran.r-project.org/package=ggpolar)

`{ggpolar}` provides a very flexible way to create dots in coordinate system
for event list and connect the dots with segments based on [`{ggplot2}`](https://ggplot2.tidyverse.org/).

## Installation

You can install the released version of `{ggpolar}` from CRAN with:

``` r
install.packages("ggpolar")
```

You can install the development version of `{ggpolar}` from GitHub with:

``` r
remotes::install_github("ShixiangWang/polar")
```

## Example

### Init a polar plot

```{r example}
library(ggpolar)

data <- data.frame(x = LETTERS[1:7])

p1 <- polar_init(data, x = x)
p1

# Set aes value
p2 <- polar_init(data, x = x, size = 3, color = "red", alpha = 0.5)
p2

# Set aes mapping
set.seed(123L)
data1 <- data.frame(
  x = LETTERS[1:7],
  shape = c("r", "r", "r", "b", "b", "b", "b"),
  color = c("r", "r", "r", "b", "b", "b", "b"),
  size = abs(rnorm(7))
)
# Check https://ggplot2.tidyverse.org/reference/geom_point.html
# for how to use both stroke and color
p3 <- polar_init(data1, x = x, aes(size = size, color = color, shape = shape), alpha = 0.5)
p3
```

### Connect polar dots

```{r}
data2 <- data.frame(
  x1 = LETTERS[1:7],
  x2 = c("B", "C", "D", "E", "C", "A", "C"),
  color = c("r", "r", "r", "b", "b", "b", "b")
)
p4 <- p3 + polar_connect(data2, x1, x2)
p4

# Unlike polar_init, mappings don't need to be included in aes()
p5 <- p3 + polar_connect(data2, x1, x2, color = color, alpha = 0.8, linetype = 2)
p5

# Use two different color scales
if (requireNamespace("ggnewscale")) {
  library(ggnewscale)
  p6 = p3 +
    new_scale("color") +
    polar_connect(data2, x1, x2, color = color, alpha = 0.8, linetype = 2)
  print(p6 + scale_color_brewer())
  print(p6 + scale_color_manual(values = c("darkgreen", "magenta")))
}
```

## Citation

If you use `{ggpolar}` in academic research, please cite the following paper along
with the GitHub repo.

*Antigen presentation and tumor immunogenicity in cancer immunotherapy response prediction*, __eLife__. https://doi.org/10.7554/eLife.49020.

Owner

  • Name: Shixiang Wang (王诗翔)
  • Login: ShixiangWang
  • Kind: user
  • Location: Guangzhou, China
  • Company: SYSUCC

纯素之道,惟神是守。守而勿失,与神为一

GitHub Events

Total
Last Year

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 11
  • Total Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
ShixiangWang w****x@s****n 11
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: about 2 months
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 0
  • Average comments per issue: 2.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • junjunlab (1)
  • thomasp85 (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • cran 264 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 9
  • Total maintainers: 1
proxy.golang.org: github.com/shixiangwang/polar
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 9 months ago
proxy.golang.org: github.com/ShixiangWang/polar
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 10 months ago
cran.r-project.org: ggpolar

Dots and Their Connections in Polar Coordinate System

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 264 Last month
Rankings
Stargazers count: 17.9%
Forks count: 28.8%
Dependent packages count: 29.8%
Average: 33.3%
Dependent repos count: 35.5%
Downloads: 54.7%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • ggplot2 * depends
  • ezcox * suggests
  • ggnewscale * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • survival * suggests