[R-pkgs] GGally - Plot Matrix Extension for GGplot2

From: Barret Schloerke <barret_at_barretschloerke.com>
Date: Thu, 21 Jan 2010 13:37:24 -0600


GGally: a companion to GGplot2.

GGally is a package built to produce plot matrices without the hassle of making viewports and labels yourself. GGally is built upon the GGplot2 framework. Keeping the functionality and feel of ggplot, GGally has shortened common function calls and added a few new ones.

ggpairs, the main function within GGally, will take your data set and produce a plots according to the data types given. ggpairs will produce four different types of plots: continuous-continuous, continuous-discrete, discrete-continuous, discrete-discrete. The function will determine which type is needed and produce a plot according the the specified type given. General aesthetics can be applied to the whole plot matrix.

This package was developed as an add on package to keep the base functionality of GGplot2 separate.

Examples:
#plot matrix of all five variables in iris
  ggpairs(iris)

# Make a ggpairs object with
# the upper triangle containing 2D density plots and box plots,
# the lower triangle containing scatter plots and dod plots,
# the diagonal containing histograms.
# The color of each plot, if applicable, will be done accordingly to "cut"
#

  diamondMatrix <- ggpairs(
    diamonds[,1:3],
    upper = list(continuous = "density", combo = "box"),     lower = list(continuous = "points", combo = "dot"),     diag = list(continuous = "bar", discrete = "bar"),     color = "cut",
    filled = TRUE,
    title = "Diamonds"
  )
# print the plot matrix

  diamondMatrix


R-packages mailing list
R-packages_at_r-project.org
https://stat.ethz.ch/mailman/listinfo/r-packages Received on Fri 22 Jan 2010 - 19:07:04 EST

This archive was generated by hypermail 2.2.0 : Fri 22 Jan 2010 - 19:10:02 EST