{"id":13401241,"url":"https://github.com/thomasp85/patchwork","last_synced_at":"2025-05-14T22:05:35.468Z","repository":{"id":42176428,"uuid":"112388106","full_name":"thomasp85/patchwork","owner":"thomasp85","description":"The Composer of ggplots","archived":false,"fork":false,"pushed_at":"2025-03-25T06:51:35.000Z","size":62859,"stargazers_count":2538,"open_issues_count":50,"forks_count":164,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-05-14T22:04:16.069Z","etag":null,"topics":["ggplot-extension","ggplot2","rstats","visualization"],"latest_commit_sha":null,"homepage":"https://patchwork.data-imaginist.com","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasp85.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-28T20:55:08.000Z","updated_at":"2025-05-13T22:12:09.000Z","dependencies_parsed_at":"2022-08-22T05:20:33.161Z","dependency_job_id":"e44b3854-b459-44f1-bead-d63da41deb92","html_url":"https://github.com/thomasp85/patchwork","commit_stats":{"total_commits":278,"total_committers":19,"mean_commits":"14.631578947368421","dds":0.09352517985611508,"last_synced_commit":"d9437579a1fbbbfe20da0e4d44814008c1b98bb2"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Fpatchwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Fpatchwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Fpatchwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Fpatchwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasp85","download_url":"https://codeload.github.com/thomasp85/patchwork/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235687,"owners_count":22036962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ggplot-extension","ggplot2","rstats","visualization"],"created_at":"2024-07-30T19:01:00.244Z","updated_at":"2025-05-14T22:05:35.380Z","avatar_url":"https://github.com/thomasp85.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  message = FALSE\n)\n```\n\n# patchwork \u003ca href='https://patchwork.data-imaginist.com'\u003e\u003cimg src='man/figures/logo.png' align=\"right\" height=\"131.5\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/thomasp85/patchwork/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/thomasp85/patchwork/actions/workflows/R-CMD-check.yaml)\n[![CRAN_Release_Badge](http://www.r-pkg.org/badges/version-ago/patchwork)](https://CRAN.R-project.org/package=patchwork)\n[![CRAN_Download_Badge](http://cranlogs.r-pkg.org/badges/patchwork)](https://CRAN.R-project.org/package=patchwork)\n[![Codecov test coverage](https://codecov.io/gh/thomasp85/patchwork/branch/main/graph/badge.svg)](https://app.codecov.io/gh/thomasp85/patchwork?branch=main)\n\u003c!-- badges: end --\u003e\n\nThe goal of `patchwork` is to make it ridiculously simple to combine separate\nggplots into the same graphic. As such it tries to solve the same problem as\n`gridExtra::grid.arrange()` and `cowplot::plot_grid` but using an API that \nincites exploration and iteration, and scales to arbitrarily complex layouts.\n\n## Installation\n\nYou can install patchwork from CRAN using `install.packages('patchwork')`. \nAlternatively you can grab the development version from github using devtools:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"thomasp85/patchwork\")\n```\n\n## Basic example\n\nThe usage of `patchwork` is simple: just add plots together!\n\n```{r example}\nlibrary(ggplot2)\nlibrary(patchwork)\n\np1 \u003c- ggplot(mtcars) + geom_point(aes(mpg, disp))\np2 \u003c- ggplot(mtcars) + geom_boxplot(aes(gear, disp, group = gear))\n\np1 + p2\n```\n\npatchwork provides rich support for arbitrarily complex layouts with full \nalignment. As an example, check out this very readable code for nesting three \nplots on top of a third:\n\n```{r, message=FALSE}\np3 \u003c- ggplot(mtcars) + geom_smooth(aes(disp, qsec))\np4 \u003c- ggplot(mtcars) + geom_bar(aes(carb))\n\n(p1 | p2 | p3) /\n      p4\n```\n\n## Learn more\npatchwork can do so much more. Check out the guides for learning everything \nthere is to know about all the different features:\n\n- [Getting Started](https://patchwork.data-imaginist.com/articles/patchwork.html)\n- [Assembling Plots](https://patchwork.data-imaginist.com/articles/guides/assembly.html)\n- [Defining Layouts](https://patchwork.data-imaginist.com/articles/guides/layout.html)\n- [Adding Annotation](https://patchwork.data-imaginist.com/articles/guides/annotation.html)\n- [Aligning across pages](https://patchwork.data-imaginist.com/articles/guides/multipage.html)\n\n## Code of Conduct\n\nPlease note that the patchwork project is released with a [Contributor Code of Conduct](https://patchwork.data-imaginist.com/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","funding_links":[],"categories":["2017","R","ggplot","其他_机器学习与深度学习","Graphic Displays"],"sub_categories":["Miscellaneous"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasp85%2Fpatchwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasp85%2Fpatchwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasp85%2Fpatchwork/lists"}