chem_dual.scatter: Creates a scatterplot with a common horizontal axis and two...

View source: R/chem_dual.scatter.R

chem_dual.scatterR Documentation

Creates a scatterplot with a common horizontal axis and two different variables plotted on the vertical axis with regression lines

Description

Creates a scatterplot with a common horizontal axis and two different variables plotted on the vertical axis with regression lines

Usage

chem_dual.scatter(data, xvar, yvar1, yvar2, xlab = "Insert X-axis label",
  ylab = "Insert Y-axis label", intercept1 = NULL, intercept2 = NULL,
  size = 3, colors = c("red", "blue"))

Arguments

data

A data frame containing variables to be plotted

xvar

The name of the x-variable

yvar1

The name of one of the y-variables

yvar2

The name of the other y-variable

xlab

A string containing the x-axis label

ylab

A string containing the y-axis label

intercept1

Set to NULL by default, but can be changed to 0 to force regression line to go through origin for yvar1

intercept2

Set to NULL by default, but can be changed to 0 to force regression line to go through origin for yvar2

size

A numeric specifying the size of the points

colors

A character vector specifying colors of two y-variables and each line

Value

A plot


ismayc/chemistr documentation built on Feb. 4, 2023, 12:44 p.m.