scatterhist: Scatter plot with marginal histograms

Description Usage Arguments Note Author(s) Examples

View source: R/scatterhist.R

Description

Produces a scatter plot for two variables, with histograms in the margins of the plot.

Usage

1
scatterhist(x, y, xlab = "", ylab = "")

Arguments

x

Vector of values to be put on the x-axis.

y

Vector of values to be put on the y-axis.

xlab

String, label of x-axis.

ylab

String, label of y-axis.

Note

Source: Adapted from the function given at http://sas-and-r.blogspot.com/2011/06/example-841-scatterplot-with-marginal.html.

Author(s)

Theo Pepler

Examples

1
2
3
4
5
data(iris)
scatterhist(x = iris$Petal.Length,
  y = iris$Petal.Width,
  xlab = 'Petal length (cm)',
  ylab = 'Petal width (cm)')

tpepler/theolib documentation built on Aug. 10, 2021, 9:53 a.m.