Create a plot matrix of posterior simulations

data(linear)

# default ggpairs plot
ggs_pairs(ggs(s))

plot of chunk ggs_pairs

# change alpha transparency of points
ggs_pairs(ggs(s), lower=list(params=c(alpha=.2)))

plot of chunk ggs_pairs

# with too many points, try contours instead
ggs_pairs(ggs(s), lower=list(continuous="density"))

plot of chunk ggs_pairs

# histograms instead of univariate densities on diagonal
ggs_pairs(ggs(s), diag=list(continuous="bar"))
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

plot of chunk ggs_pairs

# coloring results according to chains
ggs_pairs(ggs(s), color="Chain")
## Warning in stri_c(..., sep = sep, collapse = collapse, ignore_null =
## TRUE): longer object length is not a multiple of shorter object length
## Warning: The plyr::rename operation has created duplicates for the
## following name(s): (`colour`)
## Warning in stri_c(..., sep = sep, collapse = collapse, ignore_null =
## TRUE): longer object length is not a multiple of shorter object length
## Warning: The plyr::rename operation has created duplicates for the
## following name(s): (`colour`)
## Warning in stri_c(..., sep = sep, collapse = collapse, ignore_null =
## TRUE): longer object length is not a multiple of shorter object length
## Warning: The plyr::rename operation has created duplicates for the
## following name(s): (`colour`)

plot of chunk ggs_pairs

# custom points on lower panels, black contours on upper panels
ggs_pairs(ggs(s),
  upper=list(continuous="density", params=c(color="black")),
  lower=list(params=c(alpha=.2, shape=1)))

plot of chunk ggs_pairs