Skip to content

A 'ggplot2' Extension for Consistent Axis Alignment

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

Yunuuuu/ggalign

Repository files navigation

ggalign ggalign website

R-CMD-check Codecov test coverage

This package extends ggplot2, enabling consistent

axis alignment across multiple plots. It’s particularly useful for plots where data order needs to be manipulated, such as aligning a dendrogram with a heatmap.

Installation

You can install the development version of ggalign from GitHub with:

# install.packages("remotes")
remotes::install_github("Yunuuuu/ggalign")

Overviews

ggalign pacakge provides two layout to arrange ggplot objects:

  • layout_heatmap()/ggheatmap(): Arrange ggplot into a Heatmap layout. See vignette("layout-heatmap") for details.

  • layout_stack()/ggstack(): Arrange ggplot vertically or horizontally. See vignette("layout-stack") for details.

To further customize these layouts, we offer following functions:

  • align_group(): Group layout axis into panel with a group variable.
  • align_kmeans(): Group layout axis into panel by kmeans
  • align_reorder(): Reorders layout observations based on weights or summary statistics.
  • align_dendro(): Reorder or Group layout based on hierarchical clustering

For more detailed instructions on customizing layouts, see the vignette: vignette("align-layout").

Additionally, plots can be added in the layout with following functions:

  • align_gg()/ggalign(): Create ggplot object with a customized data.
  • align_panel()/ggpanel(): Create ggplot object with the layout panel data.

For more information on adding plots, refer to the vignette: vignette("align-plot").

Documentation

Examples

Releases

No releases published

Packages

No packages published

Languages