plot_marg: Scatterplot with marginals

Description Usage Arguments Value Examples

Description

Scatterplot with marginal histograms, densities or orthogonal fit lines, useful for visualizing gradients on ordinations.

Usage

1
2
plot_marg(d, x, y, over, xlab, ylab, ovlab, marg = "dens", alpha = 1,
  ...)

Arguments

d

array of data, where rows = SUs and cols = variables of interest

x

character string for which column in d to place on x axis

y

character string for which column in d to place on y axis

over

character string for which column in d to overlay

xlab

character string for label on x axis

ylab

character string for label on y axis

ovlab

character string for label on overlay axis when marg='ortho'

marg

either 'hist' for histograms, 'dens' for density plots, or 'ortho' for orthogonal fitlines

alpha

alpha level of fill colors

...

further arguments passed to other methods

Value

A plot object

Examples

1
2
3
4
5
6
7
8
9
set.seed(23)
d <- data.frame(xx=rnorm(100, mean=3))
d$yy <- rnorm(100)*10 + d$x^2
d$zz <- d$y^2

plot_marg(d=d, x='xx', y='yy', marg='hist')
plot_marg(d=d, x='xx', y='yy', marg='hist', breaks=22)
plot_marg(d=d, x='xx', y='yy', marg='dens')
plot_marg(d=d, x='xx', y='yy', over='zz', marg='ortho')

phytomosaic/ecole documentation built on Dec. 7, 2018, 6:06 p.m.