diff --git a/R/axis.R b/R/axis.R index 73ccdab..f6eb88f 100644 --- a/R/axis.R +++ b/R/axis.R @@ -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 @@ -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 @@ -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){ diff --git a/README.Rmd b/README.Rmd index 0644dfc..0411313 100644 --- a/README.Rmd +++ b/README.Rmd @@ -10,6 +10,8 @@ html_preview: false # `aplot` for decorating a plot with associated information + + `r badger::badge_license("Artistic-2.0")` `r badger::badge_github_version("YuLab-SMU/aplot", "blue")` `r badger::badge_code_size("YuLab-SMU/aplot")` diff --git a/README.md b/README.md index 4568a47..786d35f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ # `aplot` for decorating a plot with associated information + + [![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) @@ -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) ), ‘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 diff --git a/man/figures/aplot_logo.png b/man/figures/aplot_logo.png new file mode 100644 index 0000000..8bf1f4a Binary files /dev/null and b/man/figures/aplot_logo.png differ