Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions R/axis.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ alab_ <- function(label, axis, fontsize=11, ...) {
##' @importFrom ggplot2 element_blank
##' @importFrom ggplot2 margin
##' @export
ggplot_add.alab <- function(object, plot, object_name) {
ggplot_add.alab <- function(object, plot, object_name, ...) {
label <- object$label
object$label <- NULL
axis <- object$axis
Expand Down Expand Up @@ -113,7 +113,7 @@ axis_align <- function(gg, limits = NULL, axis) {
##' @importFrom ggplot2 scale_y_continuous
##' @importFrom methods is
##' @export
ggplot_add.axisAlign <- function(object, plot, object_name) {
ggplot_add.axisAlign <- function(object, plot, object_name, ...) {
limits <- object$limits

## expand_limits <- object$expand_limits
Expand Down Expand Up @@ -181,7 +181,7 @@ ggplot_add.axisAlign <- function(object, plot, object_name) {
}
## }
}
ggplot_add(scale_lim, plot, object_name)
ggplot_add(scale_lim, plot, object_name, ...)
}

set_scale_limits <- function(scales, limits, expand){
Expand Down
2 changes: 2 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ html_preview: false

# `aplot` for decorating a plot with associated information

<a href="https://yulab-smu.top/aplot/"><img src="man/figures/aplot_logo.png" height="160" align="right" /></a>

`r badger::badge_license("Artistic-2.0")`
`r badger::badge_github_version("YuLab-SMU/aplot", "blue")`
`r badger::badge_code_size("YuLab-SMU/aplot")`
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# `aplot` for decorating a plot with associated information

<a href="https://yulab-smu.top/aplot/"><img src="man/figures/aplot_logo.png" height="160" align="right" /></a>

[![License:
Artistic-2.0](https://img.shields.io/badge/license-Artistic--2.0-blue.svg)](https://cran.r-project.org/web/licenses/Artistic-2.0)
[![](https://img.shields.io/badge/devel%20version-0.2.5-blue.svg)](https://github.com/YuLab-SMU/aplot)
Expand All @@ -17,10 +19,9 @@ status](https://github.com/YuLab-SMU/aplot/workflows/rworkflows/badge.svg)](http
For many times, we are not just aligning plots as what ‘cowplot’ and
‘patchwork’ did. Users would like to align associated information that
requires axes to be exactly matched in subplots, e.g. hierarchical
clustering with a heatmap. Inspired by the ‘Method 2’ in ‘ggtree’ (G Yu
(2018) <doi:10.1093/molbev/msy194>), ‘aplot’ provides utilities to
aligns associated subplots to a main plot at different sides (left,
right, top and bottom) with axes exactly matched.
clustering with a heatmap. This package provides utilities to aligns
associated subplots to a main plot at different sides (left, right, top
and bottom) with axes exactly matched.

## :writing_hand: Authors

Expand Down
Binary file added man/figures/aplot_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading