<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/ggpubr-create-easily-publication-ready-plots/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.sthda.com/english/wiki/ggpubr-create-easily-publication-ready-plots"> Easy Guides</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p></p>
<div>
<p>The <strong>ggpubr</strong> R package facilitates the creation of beautiful ggplot2-based graphs for researcher with non-advanced programming backgrounds.</p>
<p>The current material presents a collection of articles for simply creating and customizing publication-ready plots using ggpubr. To see some examples of plots created with ggpubr click the following link: <a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/" target="_blank">ggpubr examples</a>.</p>
<p>ggpubr Key features:</p>
<ul>
<li>Wrapper around the <strong>ggplot2</strong> package with a <strong>less opaque syntax</strong> for beginners in R programming.</li>
<li>Helps researchers, with non-advanced R programming skills, to create easily <strong>publication-ready plots</strong>.</li>
<li>Makes it possible to automatically <strong>add p-values and significance levels</strong> to box plots, bar plots, line plots, and more.</li>
<li>Makes it easy to <strong>arrange and annotate multiple plots</strong> on the same page.</li>
<li>Makes it easy to <strong>change grahical parameters</strong> such as colors and labels.</li>
</ul>
<p>Official online documentation: <a rel="nofollow" href="http://www.sthda.com/english/rpkgs/ggpubr" target="_blank">http://www.sthda.com/english/rpkgs/ggpubr</a>.</p>
<p><img alt="ggpubr: publication ready plots" src="https://i1.wp.com/www.sthda.com/english/sthda-upload/images/symplyr/ggpubr-300.png?w=456" data-recalc-dims="1"></p>
<div>
<h2>Install and load ggpubr</h2>
<ul>
<li>Install from <a rel="nofollow" href="https://cran.r-project.org/package=ggpubr" target="_blank">CRAN</a> as follow:</li>
</ul>
<pre><code>install.packages(&quot;ggpubr&quot;)</code></pre>
<ul>
<li>Or, install the latest version from <a rel="nofollow" href="https://github.com/kassambara/ggpubr" target="_blank">GitHub</a> as follow:</li>
</ul>
<pre><code># Install
if(!require(devtools)) install.packages(&quot;devtools&quot;)
devtools::install_github(&quot;kassambara/ggpubr&quot;)</code></pre>
<ul>
<li>Load ggpubr:</li>
</ul>
<pre><code>library(&quot;ggpubr&quot;)</code></pre>
</div>
<div>
<h2>Related articles</h2>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/77-facilitating-exploratory-data-visualization-application-to-tcga-genomic-data/" target="_blank"><i> </i> Facilitating Exploratory Data Visualization: Application to TCGA Genomic Data</a></p>
<p>Description: Plot one or a list of variables at once.</p>
<p>Contents:</p>
<ul>
<li>Gene expression data</li>
<li>Box plots</li>
<li>Violin plots</li>
<li>Stripcharts and dot plots</li>
<li>Density plots</li>
<li>Histogram plots</li>
<li>Empirical cumulative density function</li>
<li>Quantile – Quantile plot</li>
</ul>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/76-add-p-values-and-significance-levels-to-ggplots/" target="_blank"><i> </i> Add P-values and Significance Levels to ggplots</a></p>
<p>Description: Compute and add automatically p-values and significance levels to ggplots.</p>
<p>Contents:</p>
<ul>
<li>Methods for comparing means</li>
<li>R functions to add p-values
<ul>
<li>compare_means()</li>
<li>stat_compare_means()</li>
</ul>
</li>
<li>Compare two independent groups</li>
<li>Compare two paired samples</li>
<li>Compare more than two groups</li>
<li>Multiple grouping variables</li>
</ul>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/78-perfect-scatter-plots-with-correlation-and-marginal-histograms/" target="_blank"><i> </i> Perfect Scatter Plots with Correlation and Marginal Histograms</a></p>
<p>Description: Create beautiful scatter plots with correlation coefficients and marginal histograms/density.</p>
<p>Contents:</p>
<ul>
<li>Basic plots</li>
<li>Color by groups</li>
<li>Add concentration ellipses</li>
<li>Add point labels</li>
<li>Bubble chart</li>
<li>Color by a continuous variable</li>
<li>Add marginal plots</li>
<li>Add 2d density estimation</li>
<li>Application to gene expression data</li>
</ul>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/79-plot-meansmedians-and-error-bars/" target="_blank"><i> </i> Plot Means/Medians and Error Bars</a></p>
<p>Description: Plot easily means or medians with error bars.</p>
<p>Contents:</p>
<ul>
<li>Error plots</li>
<li>Line plots</li>
<li>Bar plots</li>
<li>Add labels</li>
<li>Application to gene expression data</li>
</ul>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/80-bar-plots-and-modern-alternatives/" target="_blank"><i> </i> Bar Plots and Modern Alternatives</a></p>
<p>Description: Create easily basic and ordered bar plots, as well as, some modern alternatives to bar plots, including lollipop charts and cleveland’s dot plots.</p>
<p>Contents:</p>
<ul>
<li>Basic bar plots</li>
<li>Multiple grouping variables</li>
<li>Ordered bar plots</li>
<li>Deviation graphs</li>
<li>Alternatives to bar plots
<ul>
<li>Lollipop chart</li>
<li>Cleveland’s dot plot</li>
</ul>
</li>
</ul>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/84-add-text-labels-to-histogram-and-density-plots/" target="_blank"><i> </i> Add Text Labels to Histogram and Density Plots</a></p>
<p>Description: Create histograms/density plots and highlight some key elements on the plot.</p>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/81-ggplot2-easy-way-to-mix-multiple-graphs-on-the-same-page/" target="_blank"><i> </i> ggplot2 – Easy Way to Mix Multiple Graphs on The Same Page</a></p>
<p>Description: Step by step guide to combine multiple ggplots on the same page, as well as, over multiple pages.</p>
<p>Contents:</p>
<ul>
<li>Create some plots</li>
<li>Arrange on one page</li>
<li>Annotate the arranged figure</li>
<li>Align plot panels</li>
<li>Change column/row span of a plot</li>
<li>Use common legend for combined ggplots</li>
<li>Scatter plot with marginal density plots</li>
<li>Mix table, text and ggplot2 graphs</li>
<li>Insert a graphical element inside a ggplot
<ul>
<li>Place a table within a ggplot</li>
<li>Place a box plot within a ggplot</li>
<li>Add background image to ggplot2 graphs</li>
</ul>
</li>
<li>Arrange over multiple pages</li>
<li>Nested layout with ggarrange()</li>
<li>Export plots</li>
</ul>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/82-ggplot2-easy-way-to-change-graphical-parameters/" target="_blank"><i> </i> ggplot2 – Easy Way to Change Graphical Parameters</a></p>
<p>Description: Describe the function ggpar() [in ggpubr], which can be used to simply and easily customize any ggplot2-based graphs.</p>
<p>Contents:</p>
<ul>
<li>Change titles and axis labels</li>
<li>Change legend position &amp; appearance</li>
<li>Change color palettes
<ul>
<li>Group colors</li>
<li>Gradient colors</li>
</ul>
</li>
<li>Change axis limits and scales</li>
<li>Customize axis text and ticks</li>
<li>Rotate a plot</li>
<li>Change themes</li>
<li>Remove ggplot components</li>
</ul>
<p><a rel="nofollow" href="http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/83-create-and-customize-multi-panel-ggplots-easy-guide-to-facet/" target="_blank"><i> </i> Create and Customize Multi-panel ggplots: Easy Guide to Facet</a></p>
<p>Description: split up your data by one or more variables and to visualize the subsets of the data together.</p>
<p>Contents:</p>
<ul>
<li>Facet by one grouping variables</li>
<li>Facet by two grouping variables</li>
<li>Modifying panel label appearance</li>
</ul>
</div>
</div>

<p></p>
<p></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.sthda.com/english/wiki/ggpubr-create-easily-publication-ready-plots"> Easy Guides</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/LJdZ5VtjyzI" height="1"></a></div>