gggap

Streamlined creation of segments on the y-axis of 'ggplot2' plots

https://github.com/cmoralesmx/gggap

Science Score: 10.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
  • Academic publication links
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.5%) to scientific vocabulary

Keywords

ggplot2 plotting-in-r r
Last synced: 6 months ago · JSON representation

Repository

Streamlined creation of segments on the y-axis of 'ggplot2' plots

Basic Info
  • Host: GitHub
  • Owner: cmoralesmx
  • License: gpl-3.0
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 66.4 KB
Statistics
  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • Open Issues: 3
  • Releases: 0
Fork of ChrisLou-bioinfo/gg.gap
Topics
ggplot2 plotting-in-r r
Created over 5 years ago · Last pushed over 5 years ago
Metadata Files
Readme License

README.md

gggap

Easily create segments in the y-axis of a 'ggplot2' plot.

This project builds on top of gg.gap v1.4 by Jiacheng Lou, et al.

What changed with respect to upstream?
- Improved handling of subtitles and captions. These were duplicated and placed in the gap between the new segments of the plot.
- Legends are now supported by the core functionality.
- The code was heavily refactored following the tidyverse style guide and Clean Code principles.
- The project has a new name after lossing the punctuation mark from the former name as per the recommendations of the style guide.

CRAN RStudio mirror
downloads

Installation

You can install gggap from CRAN:

r install.packages("gggap")

A development version can be retrieved from Github:

``` r

install.packages("devtools")

devtools::install_github("cmoralesmx/gggap", ref="dev") ```

How to use gggap

``` r data(mtcars) library(ggplot2) p <- ggplot(data = mtcars, aes(x = gear, fill = gear)) + geom_bar() + ggtitle("Number of Cars by Gears") + xlab("Gears")

single segments and missing tick_width

gggap(plot = p, segments = c(5, 10), ylim = c(0, 50))

tick_width can be one or more numbers

gggap( plot = p, segments = c(5, 10), tick_width = c(1, 10), ylim = c(0, 50) )

segments list cantains more than one number vectors

gggap( plot = p, segments = list(c(2.5, 4),c(5, 10)), tick_width = c(1, 0.5, 10), ylim = c(0, 50))

rel_heights can set the relative height for segments and segmented y-axis

gggap( plot = p, segments = list(c(2.5, 4),c(5, 10)), tickwidth = c(1, 0.5, 10), relheights = c(0.2, 0, 0.2, 0,1), ylim = c(0, 50) )

reversed y-axis

p <- ggplot( data = mtcars, aes(x = gear, fill = gear) ) + geombar() + ggtitle("Number of Cars by Gears") + xlab("Gears")+ scaley_continuous(trans = 'reverse')

single segments and missing tick_width

gggap(plot = p, segments = c(10, 5), ylim = c(15, 0))

for facet()

library(ggplot2) p <- ggplot(mtcars, aes(mpg, hp)) + geompoint() p1 <- p + facetwrap(~cyl, scales = "free") gggap(plot = p1, ylim = c(60, 200), segments = c(100, 120)) ```

Owner

  • Name: Carlos Morales
  • Login: cmoralesmx
  • Kind: user
  • Location: Morelos, Mexico

GitHub Events

Total
  • Issues event: 1
Last Year
  • Issues event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 20
  • Total Committers: 2
  • Avg Commits per committer: 10.0
  • Development Distribution Score (DDS): 0.3
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Carlos Morales c****7@g****m 14
Chris Lou 3****o 6

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 4
  • Total pull requests: 0
  • Average time to close issues: 11 minutes
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • 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
  • cmoralesmx (4)
  • d-cg-b (1)
Pull Request Authors
Top Labels
Issue Labels
documentation (2) good first issue (2) enhancement (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 213 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: gggap

Streamlined Creation of Segments on the Y-Axis of 'ggplot2' Plots

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 213 Last month
Rankings
Stargazers count: 26.2%
Forks count: 28.8%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 39.5%
Downloads: 77.4%
Maintainers (1)
Last synced: 6 months ago