scatter_hist: plot quantitative x quantitative data as scatter plot with...

Description Usage Arguments Value Examples

View source: R/plotting_functions.R

Description

scatter plot with nice defaults. automatically tests for a linear association between your two variables, draws regression lines, prints stats to the plot,plots marginal histograms, etc.

Usage

1
2
3
scatter_hist(x, y, xlab = "", ylab = "", title = "", line = T,
  stats = TRUE, color = "black", line_col = "red",
  confidenceInterval = T, plottingCharacter = 16, rug = F, ...)

Arguments

x

vector of data for the x axis

y

vector of data for the y axis

xlab

x label

ylab

y label

title

main title

line

logical. draw regression line? defaults to T

stats

logical. compute sample size, p-value for regression slope, and r squared value and print to the corner of the graph? defaults to TRUE

color

color of data points. defaults to "black"

line_col

color of regression line. defaults to "red"

confidenceInterval

logical. plot confidence bands about the slope?

plottingCharacter

type of plotting character. defaults to 16, i.e., solid point

rug

logical. plot a rug plot along the x and y axes? defaults to FALSE

...

other arguments to par()

Value

None

Examples

1
2
scatter(rnorm(50,50,10),rnorm(50,30,3))
scatter(trees[,1],trees[,2],xlab="tree girth (in.)",ylab="tree height (ft.)",title="scatter_hist() example")

lukereding/redingPlot documentation built on May 21, 2017, 3:44 p.m.