thomasp85/patchwork
Fork: 163 Star: 2470 (更新于 2024-10-26 16:15:36)
license: NOASSERTION
Language: R .
The Composer of ggplots
最后发布版本: v1.3.0 ( 2024-09-16 18:09:18)
patchwork
The goal of patchwork
is to make it ridiculously simple to combine
separate ggplots into the same graphic. As such it tries to solve the
same problem as gridExtra::grid.arrange()
and cowplot::plot_grid
but
using an API that incites exploration and iteration, and scales to
arbitrarily complex layouts.
Installation
You can install patchwork from CRAN using
install.packages('patchwork')
. Alternatively you can grab the
development version from github using devtools:
# install.packages("devtools")
devtools::install_github("thomasp85/patchwork")
Basic example
The usage of patchwork
is simple: just add plots together!
library(ggplot2)
library(patchwork)
p1 <- ggplot(mtcars) + geom_point(aes(mpg, disp))
p2 <- ggplot(mtcars) + geom_boxplot(aes(gear, disp, group = gear))
p1 + p2
patchwork provides rich support for arbitrarily complex layouts with full alignment. As an example, check out this very readable code for nesting three plots on top of a third:
p3 <- ggplot(mtcars) + geom_smooth(aes(disp, qsec))
p4 <- ggplot(mtcars) + geom_bar(aes(carb))
(p1 | p2 | p3) /
p4
Learn more
patchwork can do so much more. Check out the guides for learning everything there is to know about all the different features:
Code of Conduct
Please note that the patchwork project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
最近版本更新:(数据更新于 2024-10-02 09:44:45)
2024-09-16 18:09:18 v1.3.0
2024-01-08 22:47:34 v1.2.0
2023-08-14 23:03:40 v1.1.3
2022-08-19 16:58:11 v1.1.2
2022-08-18 20:57:23 v1.1.1
2020-11-09 19:02:33 v1.1.0
2020-06-23 01:33:00 v1.0.1
2019-12-02 03:40:11 v1.0.0
主题(topics):
ggplot-extension, ggplot2, rstats, visualization
thomasp85/patchwork同语言 R最近更新仓库
2024-03-10 23:55:19 cxli233/FriendsDontLetFriends
2024-01-23 09:29:59 wilkelab/cowplot
2022-10-25 19:45:23 Dralliag/opera
2021-11-02 22:21:46 biobakery/Maaslin2
2020-06-03 15:47:30 roblanf/minion_qc
1970-01-01 00:00:00 rmcelreath/stat_rethinking_2024