{"id":8362,"date":"2019-01-05T11:03:56","date_gmt":"2019-01-05T09:03:56","guid":{"rendered":"https:\/\/www.datanovia.com\/en\/?p=8362"},"modified":"2019-12-25T11:07:42","modified_gmt":"2019-12-25T09:07:42","slug":"ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package","status":"publish","type":"post","link":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/","title":{"rendered":"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package"},"content":{"rendered":"<div id=\"rdoc\">\n<p>There are many R packages\/functions for <a href=\"\/?p=8328\">combining multiple ggplots<\/a> into the same graphics. These include: <code>gridExtra::grid.arrange()<\/code> and <code>cowplot::plot_grid<\/code>.<\/p>\n<p>Recently, Thomas Lin Pederson developed the <code>patchwork<\/code> R package to make very easy the creation of <strong>ggplot multiple plots<\/strong><\/p>\n<p>In this article, you will learn how to use the <code>pachwork<\/code> package for laying out multiple ggplots on a page.<\/p>\n<p>Contents:<\/p>\n<div id=\"TOC\">\n<ul>\n<li><a href=\"#installation\">Installation<\/a><\/li>\n<li><a href=\"#loading-required-r-packages\">Loading required R packages<\/a>\n<ul>\n<li><a href=\"#create-some-basic-plots\">Create some basic plots<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#horizontal-layouts\">Horizontal layouts<\/a><\/li>\n<li><a href=\"#vertical-layouts\">Vertical layouts<\/a><\/li>\n<li><a href=\"#specify-the-dimensions-of-each-plot\">Specify the dimensions of each plot<\/a><\/li>\n<li><a href=\"#add-space-between-plots\">Add space between plots<\/a><\/li>\n<li><a href=\"#nested-layouts\">Nested layouts<\/a><\/li>\n<li><a href=\"#advanced-features\">Advanced features<\/a><\/li>\n<li><a href=\"#reference\">Reference<\/a><\/li>\n<\/ul>\n<\/div>\n<div class='dt-sc-hr-invisible-medium  '><\/div>\n<div class='dt-sc-ico-content type1'><div class='custom-icon' ><a href='https:\/\/www.datanovia.com\/en\/product\/ggplot2-essentials-for-great-data-visualization-in-r\/' target='_blank'><span class='fa fa-book'><\/span><\/a><\/div><h4><a href='https:\/\/www.datanovia.com\/en\/product\/ggplot2-essentials-for-great-data-visualization-in-r\/' target='_blank'> Related Book <\/a><\/h4>GGPlot2 Essentials for Great Data Visualization in R<\/div>\n<div class='dt-sc-hr-invisible-medium  '><\/div>\n<div id=\"installation\" class=\"section level2\">\n<h2>Installation<\/h2>\n<p>At the date of writing this article, pathchwork was only available in developmental version from GitHub.<\/p>\n<p>You can install patchwork from github with:<\/p>\n<pre class=\"r\"><code>if(!require(devtools)) install.packages(\"devtools\")\r\ndevtools::install_github(\"thomasp85\/patchwork\")<\/code><\/pre>\n<\/div>\n<div id=\"loading-required-r-packages\" class=\"section level2\">\n<h2>Loading required R packages<\/h2>\n<p>Load the ggplot2 package and set the default theme to <code>theme_bw()<\/code> with the legend at the top of the plot:<\/p>\n<pre class=\"r\"><code>library(ggplot2)\r\nlibrary(patchwork)\r\ntheme_set(\r\n  theme_bw() +\r\n    theme(legend.position = \"top\")\r\n  )<\/code><\/pre>\n<div id=\"create-some-basic-plots\" class=\"section level3\">\n<h3>Create some basic plots<\/h3>\n<p>The following R code creates 4 plots, including: box plot, dot plot, line plot and density plot.<\/p>\n<pre class=\"r\"><code># 0. Define custom color palette and prepare the data\r\nmy3cols &lt;- c(\"#E7B800\", \"#2E9FDF\", \"#FC4E07\")\r\nToothGrowth$dose &lt;- as.factor(ToothGrowth$dose)\r\n\r\n# 1. Create a box plot (bp)\r\np &lt;- ggplot(ToothGrowth, aes(x = dose, y = len))\r\nbxp &lt;- p + geom_boxplot(aes(color = dose)) +\r\n  scale_color_manual(values = my3cols)\r\n\r\n# 2. Create a dot plot (dp)\r\ndp &lt;- p + geom_dotplot(aes(color = dose, fill = dose), \r\n                       binaxis='y', stackdir='center') +\r\n  scale_color_manual(values = my3cols) + \r\n  scale_fill_manual(values = my3cols)\r\n\r\n# 3. Create a line plot\r\nlp &lt;- ggplot(economics, aes(x = date, y = psavert)) + \r\n  geom_line(color = \"#E46726\") \r\n\r\n# 4. Density plot\r\ndens &lt;- ggplot(iris, aes(Sepal.Length)) +\r\n  geom_density(aes(color = Species)) +\r\n  scale_color_manual(values = my3cols)<\/code><\/pre>\n<\/div>\n<\/div>\n<div id=\"horizontal-layouts\" class=\"section level2\">\n<h2>Horizontal layouts<\/h2>\n<p>The usage of <code>patchwork<\/code> is simple: just add plots together!<\/p>\n<pre class=\"r\"><code>bxp + dens<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-combone-plot-horizontally-1.png\" width=\"576\" \/><\/p>\n<\/div>\n<div id=\"vertical-layouts\" class=\"section level2\">\n<h2>Vertical layouts<\/h2>\n<p>Layouts can be specified by adding a <code>plot_layout()<\/code> call to the assemble. This lets you define the dimensions of the grid and how much space to allocate to the different rows and columns.<\/p>\n<pre class=\"r\"><code>bxp + dens + plot_layout(ncol = 1)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-vertical-layout-1.png\" width=\"384\" \/><\/p>\n<\/div>\n<div id=\"specify-the-dimensions-of-each-plot\" class=\"section level2\">\n<h2>Specify the dimensions of each plot<\/h2>\n<ul>\n<li>Change height<\/li>\n<\/ul>\n<pre class=\"r\"><code>bxp + dens + plot_layout(ncol = 1, heights = c(1, 3))<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-change-dimension-height-1.png\" width=\"384\" \/><\/p>\n<ul>\n<li>Change width<\/li>\n<\/ul>\n<pre class=\"r\"><code>bxp + dens + plot_layout(ncol = 2, width = c(1, 2))<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-change-dimension-width-1.png\" width=\"576\" \/><\/p>\n<\/div>\n<div id=\"add-space-between-plots\" class=\"section level2\">\n<h2>Add space between plots<\/h2>\n<pre class=\"r\"><code>bxp + plot_spacer() + dens<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-add-space-between-plots-1.png\" width=\"576\" \/><\/p>\n<\/div>\n<div id=\"nested-layouts\" class=\"section level2\">\n<h2>Nested layouts<\/h2>\n<p>You can make nested plots layout by wrapping part of the plots in parentheses - in these cases the layout is scoped to the different nesting levels.<\/p>\n<pre class=\"r\"><code>lp + {\r\n  dens + {\r\n    bxp +\r\n    dp +\r\n    plot_layout(ncol = 1)\r\n  }\r\n} +\r\n  plot_layout(ncol = 1)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-nested-layout-1.png\" width=\"576\" \/><\/p>\n<\/div>\n<div id=\"advanced-features\" class=\"section level2\">\n<h2>Advanced features<\/h2>\n<p><code>patchwork<\/code> provides some other operators that might be of interest: <code>-<\/code> will behave like <code>+<\/code> but put the left and right side in the same nesting level (as opposed to putting the right side into the left sides nesting level).<\/p>\n<pre class=\"r\"><code>bxp + dp - lp + plot_layout(ncol = 1)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-subtract-placement-1.png\" width=\"576\" \/><\/p>\n<p>It can be seen that <code>bxp + dens<\/code> and <code>lp<\/code> is on the same level\u2026<\/p>\n<div class=\"notice\">\n<p>A note on semantics. If <code>-<\/code> is read as <em>subtract<\/em> its use makes little sense as we are not removing plots. Think of it as a hyphen instead\u2026<\/p>\n<\/div>\n<p>Often you are interested in just putting plots besides or on top of each other. <code>patchwork<\/code> provides both <code>|<\/code> and <code>\/<\/code> for horizontal and vertical layouts respectively. They can of course be combined for a very readable layout syntax:<\/p>\n<pre class=\"r\"><code>(bxp | lp | dp) \/ dens<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-intuitive-layout-1.png\" width=\"576\" \/><\/p>\n<pre class=\"r\"><code>(bxp | lp ) \/ (dp | dens)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-intuitive-layout-2.png\" width=\"576\" \/><\/p>\n<pre class=\"r\"><code>(bxp \/ lp \/ dp) | dens<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-intuitive-layout-3.png\" width=\"576\" \/><\/p>\n<p>There are two additional operators that are used for a slightly different purpose, namely to reduce code repetition. Consider the case where you want to change the theme for all plots in an assemble.<\/p>\n<p>Instead of modifying all plots individually you can use <code>&amp;<\/code> or <code>*<\/code> to add elements to all subplots. The two differ in that <code>*<\/code> will only affect the plots on the current nesting level:<\/p>\n<pre class=\"r\"><code>(bxp + (dp + dens) + lp + plot_layout(ncol = 1)) * theme_gray()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-reduce-code-repetition-1-1.png\" width=\"480\" \/><\/p>\n<p>whereas <code>&amp;<\/code> will recurse into nested levels:<\/p>\n<pre class=\"r\"><code>(bxp + (dp + dens) + lp + plot_layout(ncol = 1)) &amp; theme_gray()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/ggplot2\/figures\/115-ggplot-multiple-plots-reduce-code-repetition-2-1.png\" width=\"480\" \/><\/p>\n<div class=\"warning\">\n<p>Note that parenthesis is required in the former case due to higher precedence of the <code>*<\/code> operator. The latter case is the most common so it has deserved the easiest use.<\/p>\n<\/div>\n<\/div>\n<div id=\"reference\" class=\"section level2\">\n<h2>Reference<\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/thomasp85\/patchwork\">patchwork github page<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p><!--end rdoc--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many R packages\/functions for combining multiple ggplots into the same graphics. These include: gridExtra::grid.arrange() and cowplot::plot_grid. Recently, Thomas Lin Pederson developed the patchwork R package to make very [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7750,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rating_form_position":"","rating_results_position":"","mr_structured_data_type":"","footnotes":""},"categories":[124],"tags":[],"class_list":["post-8362","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ggplot2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package - Datanovia<\/title>\n<meta name=\"description\" content=\"In this article, you will learn how to use the pachwork package for laying out easily multiple ggplots on a page.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package - Datanovia\" \/>\n<meta property=\"og:description\" content=\"In this article, you will learn how to use the pachwork package for laying out easily multiple ggplots on a page.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/\" \/>\n<meta property=\"og:site_name\" content=\"Datanovia\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-05T09:03:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-25T09:07:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alboukadel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alboukadel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/\"},\"author\":{\"name\":\"Alboukadel\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e\"},\"headline\":\"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package\",\"datePublished\":\"2019-01-05T09:03:56+00:00\",\"dateModified\":\"2019-12-25T09:07:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/\"},\"wordCount\":510,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg\",\"articleSection\":[\"ggplot2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/\",\"name\":\"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package - Datanovia\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg\",\"datePublished\":\"2019-01-05T09:03:56+00:00\",\"dateModified\":\"2019-12-25T09:07:42+00:00\",\"description\":\"In this article, you will learn how to use the pachwork package for laying out easily multiple ggplots on a page.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#primaryimage\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg\",\"width\":1024,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.datanovia.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"name\":\"Datanovia\",\"description\":\"Data Mining and Statistics for Decision Support\",\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.datanovia.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\",\"name\":\"Datanovia\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"width\":98,\"height\":99,\"caption\":\"Datanovia\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e\",\"name\":\"Alboukadel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g\",\"caption\":\"Alboukadel\"},\"url\":\"https:\/\/www.datanovia.com\/en\/blog\/author\/kassambara\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package - Datanovia","description":"In this article, you will learn how to use the pachwork package for laying out easily multiple ggplots on a page.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/","og_locale":"en_US","og_type":"article","og_title":"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package - Datanovia","og_description":"In this article, you will learn how to use the pachwork package for laying out easily multiple ggplots on a page.","og_url":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/","og_site_name":"Datanovia","article_published_time":"2019-01-05T09:03:56+00:00","article_modified_time":"2019-12-25T09:07:42+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg","type":"image\/jpeg"}],"author":"Alboukadel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Alboukadel","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#article","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/"},"author":{"name":"Alboukadel","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e"},"headline":"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package","datePublished":"2019-01-05T09:03:56+00:00","dateModified":"2019-12-25T09:07:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/"},"wordCount":510,"commentCount":2,"publisher":{"@id":"https:\/\/www.datanovia.com\/en\/#organization"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg","articleSection":["ggplot2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/","url":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/","name":"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package - Datanovia","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#primaryimage"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg","datePublished":"2019-01-05T09:03:56+00:00","dateModified":"2019-12-25T09:07:42+00:00","description":"In this article, you will learn how to use the pachwork package for laying out easily multiple ggplots on a page.","breadcrumb":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#primaryimage","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/10\/IMG_5010.jpg","width":1024,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/www.datanovia.com\/en\/blog\/ggplot-multiple-plots-made-ridiculuous-simple-using-patchwork-r-package\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.datanovia.com\/en\/"},{"@type":"ListItem","position":2,"name":"GGPlot Multiple Plots Made Ridiculuous Simple Using Patchwork R Package"}]},{"@type":"WebSite","@id":"https:\/\/www.datanovia.com\/en\/#website","url":"https:\/\/www.datanovia.com\/en\/","name":"Datanovia","description":"Data Mining and Statistics for Decision Support","publisher":{"@id":"https:\/\/www.datanovia.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.datanovia.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.datanovia.com\/en\/#organization","name":"Datanovia","url":"https:\/\/www.datanovia.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","width":98,"height":99,"caption":"Datanovia"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e","name":"Alboukadel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g","caption":"Alboukadel"},"url":"https:\/\/www.datanovia.com\/en\/blog\/author\/kassambara\/"}]}},"multi-rating":{"mr_rating_results":[]},"_links":{"self":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/posts\/8362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/comments?post=8362"}],"version-history":[{"count":2,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/posts\/8362\/revisions"}],"predecessor-version":[{"id":11638,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/posts\/8362\/revisions\/11638"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media\/7750"}],"wp:attachment":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media?parent=8362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/categories?post=8362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/tags?post=8362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}