ggplot2.multiplot : Put multiple graphs on the same page using ggplot2 - Easy Guides - Wiki (2024)

  • Discussion
  • Introduction
  • Install and load easyGgplot2 package
  • Examples
  • ggplot2.multiplot function
    • Description
    • usage
    • Arguments
  • Easy ggplot2 ebook
  • Infos

ggplot2.multiplot is an easy to use function to put multiple graphs on the same page using R statistical software and ggplot2 plotting methods. This function is from easyGgplot2 package.

easyGgplot2 R package can be installed as follow :

install.packages("devtools")library(devtools)install_github("easyGgplot2", "kassambara")

Load the package using this R code :

library(easyGgplot2)
# data.framedf <- ToothGrowth# Custom box plot with centered dot plotplot1<-ggplot2.boxplot(data=df, xName='dose',yName='len', groupName='dose', addDot=TRUE, dotSize=1, showLegend=FALSE)# Custom dot plot with centered dot plotplot2<-ggplot2.dotplot(data=df, xName='dose',yName='len', groupName='dose',showLegend=FALSE)# Custom strip chart with centered dot plotplot3<-ggplot2.stripchart(data=df, xName='dose',yName='len', groupName='dose', showLegend=FALSE)# Notched box plotplot4<-ggplot2.boxplot(data=df, xName='dose',yName='len', notch=TRUE)# Multiple graphs on the same pageggplot2.multiplot(plot1,plot2,plot3,plot4, cols=2)

ggplot2.multiplot : Put multiple graphs on the same page using ggplot2 - Easy Guides - Wiki (1)

usage

library(easyGgplot2)ggplot2.multiplot(..., plotlist=NULL, cols=2)

Arguments

ArgumentsDescriptions
…, plotListList of ggplot2 objects separated by a comma. (e.g: plot1, plot2, plot3)
colsNumber of columns in layout

Note that an eBook is available on easyGgplot2 package here.

By Alboukadel Kassambara

Copyright 2014 Alboukadel Kassambara. All rights reserved.

Published by STHDA (http://www.sthda.com/english).

September 2014 : First edition.

Licence : This document is under creative commons licence (http://creativecommons.org/licenses/by-nc-sa/3.0/).

Contact : Alboukadel Kassambara alboukadel.kassambara@gmail.com

This analysis was performed using R (ver. 3.1.0), easyGgplot2 (ver 1.0.0) and ggplot2 (ver 1.0.0).


Enjoyed this article? I’d be very grateful if you’d help it spread by emailing it to a friend, or sharing it on Twitter, Facebook or Linked In.

Show me some love with the like buttons below... Thank you and please don't forget to share and comment below!!

Avez vous aimé cet article? Je vous serais très reconnaissant si vous aidiez à sa diffusion en l'envoyant par courriel à un ami ou en le partageant sur Twitter, Facebook ou Linked In.

Montrez-moi un peu d'amour avec les like ci-dessous ... Merci et n'oubliez pas, s'il vous plaît, de partager et de commenter ci-dessous!



Recommended for You!


Machine Learning Essentials: Practical Guide in R
Practical Guide to Cluster Analysis in R
Practical Guide to Principal Component Methods in R
R Graphics Essentials for Great Data Visualization
Network Analysis and Visualization in R
More books on R and data science

Recommended for you

This section contains best data science and self-development resources to help you on your path.

Coursera - Online Courses and Specialization

Data science

Popular Courses Launched in 2020

Trending Courses

Books - Data Science

Our Books

Others



Want to Learn More on R Programming and Data Science?

Follow us by Email

On Social Networks:

Get involved :
Click to follow us on Facebook and Google+ :
Comment this article by clicking on "Discussion" button (top-right position of this page)

ggplot2.multiplot : Put multiple graphs on the same page using ggplot2 - Easy Guides - Wiki (2024)
Top Articles
Latest Posts
Article information

Author: Lilliana Bartoletti

Last Updated:

Views: 6776

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Lilliana Bartoletti

Birthday: 1999-11-18

Address: 58866 Tricia Spurs, North Melvinberg, HI 91346-3774

Phone: +50616620367928

Job: Real-Estate Liaison

Hobby: Graffiti, Astronomy, Handball, Magic, Origami, Fashion, Foreign language learning

Introduction: My name is Lilliana Bartoletti, I am a adventurous, pleasant, shiny, beautiful, handsome, zealous, tasty person who loves writing and wants to share my knowledge and understanding with you.