Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wilkelab/ggridges
Ridgeline plots in ggplot2
https://github.com/wilkelab/ggridges
Last synced: 3 months ago
JSON representation
Ridgeline plots in ggplot2
- Host: GitHub
- URL: https://github.com/wilkelab/ggridges
- Owner: wilkelab
- License: gpl-2.0
- Created: 2017-09-13T04:05:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-15T16:27:38.000Z (6 months ago)
- Last Synced: 2024-05-19T00:29:47.681Z (6 months ago)
- Language: R
- Homepage: https://wilkelab.org/ggridges
- Size: 289 MB
- Stars: 406
- Watchers: 12
- Forks: 29
- Open Issues: 46
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
- awesome-r-dataviz - ggridges - Geoms to make ridgeline plots with ggplot2. (ggplot / Additional Plot Types)
README
---
output: github_document
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```# ggridges: Ridgeline plots in ggplot2
[![R build status](https://github.com/wilkelab/ggridges/workflows/R-CMD-check/badge.svg)](https://github.com/wilkelab/ggridges/actions)
[![Coverage Status](https://img.shields.io/codecov/c/github/wilkelab/ggridges/master.svg)](https://app.codecov.io/github/wilkelab/ggridges?branch=master)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/ggridges)](https://CRAN.R-project.org/package=ggridges)
[![CRAN_Downloads_Badge](https://cranlogs.r-pkg.org/badges/ggridges)](https://cranlogs.r-pkg.org/downloads/total/last-month/ggridges)
[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#maturing)Ridgeline plots are partially overlapping line plots that create the impression of a mountain range. They can be quite useful for visualizing changes in distributions over time or space.
## Installation
Please install the stable release from CRAN:
```{r eval = FALSE}
install.packages("ggridges")
```Alternatively, you can install the latest development version from github:
```{r eval = FALSE}
remotes::install_github("wilkelab/ggridges")
```## Usage
```{r diamonds, warning = FALSE}
library(ggplot2)
library(ggridges)
ggplot(diamonds, aes(x = price, y = cut)) +
geom_density_ridges(scale = 4) +
scale_y_discrete(expand = c(0, 0)) + # will generally have to set the `expand` option
scale_x_continuous(expand = c(0, 0)) + # for both axes to remove unneeded padding
coord_cartesian(clip = "off") + # to avoid clipping of the very top of the top ridgeline
theme_ridges()
```## Documentation and Examples
First read the [package vignette.](https://wilkelab.org/ggridges/articles/introduction.html) Then read the [reference manual.](https://wilkelab.org/ggridges/reference/index.html)